[x86] add olpc 2.6.31 configuration, forward port the block2mtd patch, refresh patches
[openwrt.git] / target / linux / s3c24xx / patches-2.6.31 / 080-nr-tty-devices.patch
1 From 615dc14d7d29e2ff36e1da3cbb421884137bb7eb Mon Sep 17 00:00:00 2001
2 From: Lars-Peter Clausen <lars@metafoo.de>
3 Date: Tue, 21 Jul 2009 12:51:00 +0200
4 Subject: [PATCH] 080-nr-tty-devices.patch
5
6 ---
7 drivers/char/Kconfig | 12 ++++++++++++
8 include/linux/vt.h | 11 +++++++++++
9 2 files changed, 23 insertions(+), 0 deletions(-)
10
11 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
12 index 6a06913..8e17552 100644
13 --- a/drivers/char/Kconfig
14 +++ b/drivers/char/Kconfig
15 @@ -66,6 +66,18 @@ config VT_CONSOLE
16
17 If unsure, say Y.
18
19 +config NR_TTY_DEVICES
20 + int "Maximum tty device number"
21 + depends on VT
22 + default 63
23 + ---help---
24 + This is the highest numbered device created in /dev. You will actually have
25 + NR_TTY_DEVICES+1 devices in /dev. The default is 63, which will result in
26 + 64 /dev entries. The lowest number you can set is 11, anything below that,
27 + and it will default to 11. 63 is also the upper limit so we don't overrun
28 + the serial consoles.
29 +
30 +
31 config HW_CONSOLE
32 bool
33 depends on VT && !S390 && !UML
34 diff --git a/include/linux/vt.h b/include/linux/vt.h
35 index 02c1c02..2ba4d21 100644
36 --- a/include/linux/vt.h
37 +++ b/include/linux/vt.h
38 @@ -18,8 +18,19 @@ extern int unregister_vt_notifier(struct notifier_block *nb);
39 * resizing).
40 */
41 #define MIN_NR_CONSOLES 1 /* must be at least 1 */
42 +#if (CONFIG_NR_TTY_DEVICES < 4)
43 +/* Lower Limit */
44 +#define MAX_NR_CONSOLES 4 /* serial lines start at 64 */
45 +#define MAX_NR_USER_CONSOLES 4 /* must be root to allocate above this */
46 +#elif (CONFIG_NR_TTY_DEVICES > 63)
47 +/* Upper Limit */
48 #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
49 #define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
50 +#else
51 +/* They chose a sensible number */
52 +#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES
53 +#define MAX_NR_USER_CONSOLES CONFIG_NR_TTY_DEVICES
54 +#endif
55 /* Note: the ioctl VT_GETSTATE does not work for
56 consoles 16 and higher (since it returns a short) */
57
58 --
59 1.5.6.5
60
This page took 0.041453 seconds and 5 git commands to generate.