[ar71xx] remove duplicated includes
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1044-config-nr-tty-devices.patch.patch
1 From 29296aa9ec0140894c77b076806217fd19c0ce9d Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Sun, 13 Apr 2008 07:23:47 +0100
4 Subject: [PATCH] config-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 2e3a0d4..ed913da 100644
13 --- a/drivers/char/Kconfig
14 +++ b/drivers/char/Kconfig
15 @@ -58,6 +58,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.047998 seconds and 5 git commands to generate.