aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/pty.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index de14aea34e11..73de77105fea 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -248,14 +248,19 @@ static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file,
248 return -ENOIOCTLCMD; 248 return -ENOIOCTLCMD;
249} 249}
250 250
251static int legacy_count = CONFIG_LEGACY_PTY_COUNT;
252module_param(legacy_count, int, 0);
253
251static void __init legacy_pty_init(void) 254static void __init legacy_pty_init(void)
252{ 255{
256 if (legacy_count <= 0)
257 return;
253 258
254 pty_driver = alloc_tty_driver(NR_PTYS); 259 pty_driver = alloc_tty_driver(legacy_count);
255 if (!pty_driver) 260 if (!pty_driver)
256 panic("Couldn't allocate pty driver"); 261 panic("Couldn't allocate pty driver");
257 262
258 pty_slave_driver = alloc_tty_driver(NR_PTYS); 263 pty_slave_driver = alloc_tty_driver(legacy_count);
259 if (!pty_slave_driver) 264 if (!pty_slave_driver)
260 panic("Couldn't allocate pty slave driver"); 265 panic("Couldn't allocate pty slave driver");
261 266