X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fpty.c;h=73de77105fea9c9a58c8ed704fab7626b2bfb2d1;hb=dc8c85871c9728c5fddca6854a191fd41eb9438c;hp=c07a1b5cd05d3f31204fab9eb7810e9704d96e08;hpb=e7b3ca08549caccf5d6e1cf066780bf4f0ae77a7;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/pty.c b/drivers/char/pty.c index c07a1b5cd05..73de77105fe 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -14,7 +14,6 @@ #include /* For EXPORT_SYMBOL */ #include -#include #include #include #include @@ -249,14 +248,19 @@ static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file, return -ENOIOCTLCMD; } +static int legacy_count = CONFIG_LEGACY_PTY_COUNT; +module_param(legacy_count, int, 0); + static void __init legacy_pty_init(void) { + if (legacy_count <= 0) + return; - pty_driver = alloc_tty_driver(NR_PTYS); + pty_driver = alloc_tty_driver(legacy_count); if (!pty_driver) panic("Couldn't allocate pty driver"); - pty_slave_driver = alloc_tty_driver(NR_PTYS); + pty_slave_driver = alloc_tty_driver(legacy_count); if (!pty_slave_driver) panic("Couldn't allocate pty slave driver");