rfkill config cleanup
[openwrt/svn-archive/archive.git] / target / linux / s3c24xx / patches-2.6.30 / 080-nr-tty-devices.patch
1 --- a/include/linux/vt.h
2 +++ b/include/linux/vt.h
3 @@ -18,8 +18,19 @@ extern int unregister_vt_notifier(struct
4 * resizing).
5 */
6 #define MIN_NR_CONSOLES 1 /* must be at least 1 */
7 +#if (CONFIG_NR_TTY_DEVICES < 4)
8 +/* Lower Limit */
9 +#define MAX_NR_CONSOLES 4 /* serial lines start at 64 */
10 +#define MAX_NR_USER_CONSOLES 4 /* must be root to allocate above this */
11 +#elif (CONFIG_NR_TTY_DEVICES > 63)
12 +/* Upper Limit */
13 #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
14 #define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
15 +#else
16 +/* They chose a sensible number */
17 +#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES
18 +#define MAX_NR_USER_CONSOLES CONFIG_NR_TTY_DEVICES
19 +#endif
20 /* Note: the ioctl VT_GETSTATE does not work for
21 consoles 16 and higher (since it returns a short) */
22
23 --- a/drivers/char/Kconfig
24 +++ b/drivers/char/Kconfig
25 @@ -66,6 +66,18 @@ config VT_CONSOLE
26
27 If unsure, say Y.
28
29 +config NR_TTY_DEVICES
30 + int "Maximum tty device number"
31 + depends on VT
32 + default 63
33 + ---help---
34 + This is the highest numbered device created in /dev. You will actually have
35 + NR_TTY_DEVICES+1 devices in /dev. The default is 63, which will result in
36 + 64 /dev entries. The lowest number you can set is 11, anything below that,
37 + and it will default to 11. 63 is also the upper limit so we don't overrun
38 + the serial consoles.
39 +
40 +
41 config HW_CONSOLE
42 bool
43 depends on VT && !S390 && !UML