summaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.31/080-nr-tty-devices.patch
diff options
context:
space:
mode:
authorlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-21 18:29:46 +0000
committerlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-21 18:29:46 +0000
commite2813918b96b7e6d5f5a37811e507246e604747f (patch)
treec656b15f93b7b083730061833ec95619662ce47a /target/linux/s3c24xx/patches-2.6.31/080-nr-tty-devices.patch
parentdac1d868d3131c0a9b579ccc07833faa208d2d08 (diff)
[s3c24xx] Add 2.6.31 patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17665 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.31/080-nr-tty-devices.patch')
-rw-r--r--target/linux/s3c24xx/patches-2.6.31/080-nr-tty-devices.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.31/080-nr-tty-devices.patch b/target/linux/s3c24xx/patches-2.6.31/080-nr-tty-devices.patch
new file mode 100644
index 000000000..f594e3d29
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.31/080-nr-tty-devices.patch
@@ -0,0 +1,60 @@
+From 615dc14d7d29e2ff36e1da3cbb421884137bb7eb Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Tue, 21 Jul 2009 12:51:00 +0200
+Subject: [PATCH] 080-nr-tty-devices.patch
+
+---
+ drivers/char/Kconfig | 12 ++++++++++++
+ include/linux/vt.h | 11 +++++++++++
+ 2 files changed, 23 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
+index 6a06913..8e17552 100644
+--- a/drivers/char/Kconfig
++++ b/drivers/char/Kconfig
+@@ -66,6 +66,18 @@ config VT_CONSOLE
+
+ If unsure, say Y.
+
++config NR_TTY_DEVICES
++ int "Maximum tty device number"
++ depends on VT
++ default 63
++ ---help---
++ This is the highest numbered device created in /dev. You will actually have
++ NR_TTY_DEVICES+1 devices in /dev. The default is 63, which will result in
++ 64 /dev entries. The lowest number you can set is 11, anything below that,
++ and it will default to 11. 63 is also the upper limit so we don't overrun
++ the serial consoles.
++
++
+ config HW_CONSOLE
+ bool
+ depends on VT && !S390 && !UML
+diff --git a/include/linux/vt.h b/include/linux/vt.h
+index 02c1c02..2ba4d21 100644
+--- a/include/linux/vt.h
++++ b/include/linux/vt.h
+@@ -18,8 +18,19 @@ extern int unregister_vt_notifier(struct notifier_block *nb);
+ * resizing).
+ */
+ #define MIN_NR_CONSOLES 1 /* must be at least 1 */
++#if (CONFIG_NR_TTY_DEVICES < 4)
++/* Lower Limit */
++#define MAX_NR_CONSOLES 4 /* serial lines start at 64 */
++#define MAX_NR_USER_CONSOLES 4 /* must be root to allocate above this */
++#elif (CONFIG_NR_TTY_DEVICES > 63)
++/* Upper Limit */
+ #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
+ #define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
++#else
++/* They chose a sensible number */
++#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES
++#define MAX_NR_USER_CONSOLES CONFIG_NR_TTY_DEVICES
++#endif
+ /* Note: the ioctl VT_GETSTATE does not work for
+ consoles 16 and higher (since it returns a short) */
+
+--
+1.5.6.5
+