aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/pty.c')
-rw-r--r--drivers/char/pty.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 62f282e67638..d83a43130df4 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -29,6 +29,7 @@
29#include <linux/uaccess.h> 29#include <linux/uaccess.h>
30#include <linux/bitops.h> 30#include <linux/bitops.h>
31#include <linux/devpts_fs.h> 31#include <linux/devpts_fs.h>
32#include <linux/slab.h>
32 33
33#include <asm/system.h> 34#include <asm/system.h>
34 35
@@ -220,7 +221,7 @@ static void pty_set_termios(struct tty_struct *tty,
220 * @tty: tty being resized 221 * @tty: tty being resized
221 * @ws: window size being set. 222 * @ws: window size being set.
222 * 223 *
223 * Update the termios variables and send the neccessary signals to 224 * Update the termios variables and send the necessary signals to
224 * peform a terminal resize correctly 225 * peform a terminal resize correctly
225 */ 226 */
226 227
@@ -431,30 +432,25 @@ static struct cdev ptmx_cdev;
431 432
432static struct ctl_table pty_table[] = { 433static struct ctl_table pty_table[] = {
433 { 434 {
434 .ctl_name = PTY_MAX,
435 .procname = "max", 435 .procname = "max",
436 .maxlen = sizeof(int), 436 .maxlen = sizeof(int),
437 .mode = 0644, 437 .mode = 0644,
438 .data = &pty_limit, 438 .data = &pty_limit,
439 .proc_handler = &proc_dointvec_minmax, 439 .proc_handler = proc_dointvec_minmax,
440 .strategy = &sysctl_intvec,
441 .extra1 = &pty_limit_min, 440 .extra1 = &pty_limit_min,
442 .extra2 = &pty_limit_max, 441 .extra2 = &pty_limit_max,
443 }, { 442 }, {
444 .ctl_name = PTY_NR,
445 .procname = "nr", 443 .procname = "nr",
446 .maxlen = sizeof(int), 444 .maxlen = sizeof(int),
447 .mode = 0444, 445 .mode = 0444,
448 .data = &pty_count, 446 .data = &pty_count,
449 .proc_handler = &proc_dointvec, 447 .proc_handler = proc_dointvec,
450 }, { 448 },
451 .ctl_name = 0 449 {}
452 }
453}; 450};
454 451
455static struct ctl_table pty_kern_table[] = { 452static struct ctl_table pty_kern_table[] = {
456 { 453 {
457 .ctl_name = KERN_PTY,
458 .procname = "pty", 454 .procname = "pty",
459 .mode = 0555, 455 .mode = 0555,
460 .child = pty_table, 456 .child = pty_table,
@@ -464,7 +460,6 @@ static struct ctl_table pty_kern_table[] = {
464 460
465static struct ctl_table pty_root_table[] = { 461static struct ctl_table pty_root_table[] = {
466 { 462 {
467 .ctl_name = CTL_KERN,
468 .procname = "kernel", 463 .procname = "kernel",
469 .mode = 0555, 464 .mode = 0555,
470 .child = pty_kern_table, 465 .child = pty_kern_table,
@@ -665,7 +660,7 @@ static int __ptmx_open(struct inode *inode, struct file *filp)
665 if (!retval) 660 if (!retval)
666 return 0; 661 return 0;
667out1: 662out1:
668 tty_release_dev(filp); 663 tty_release(inode, filp);
669 return retval; 664 return retval;
670out: 665out:
671 devpts_kill_index(inode, index); 666 devpts_kill_index(inode, index);