Revert "ARM: tegra: tegratab: dummy change"
[linux-2.6.git] / drivers / tty / pty.c
index d505837..cf9a191 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/devpts_fs.h>
 #include <linux/slab.h>
 
-#include <asm/system.h>
 
 #ifdef CONFIG_UNIX98_PTYS
 static struct tty_driver *ptm_driver;
@@ -48,7 +47,6 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
        tty->packet = 0;
        if (!tty->link)
                return;
-       tty->link->packet = 0;
        set_bit(TTY_OTHER_CLOSED, &tty->link->flags);
        wake_up_interruptible(&tty->link->read_wait);
        wake_up_interruptible(&tty->link->write_wait);
@@ -393,7 +391,6 @@ static void __init legacy_pty_init(void)
        if (!pty_slave_driver)
                panic("Couldn't allocate pty slave driver");
 
-       pty_driver->owner = THIS_MODULE;
        pty_driver->driver_name = "pty_master";
        pty_driver->name = "pty";
        pty_driver->major = PTY_MASTER_MAJOR;
@@ -411,7 +408,6 @@ static void __init legacy_pty_init(void)
        pty_driver->other = pty_slave_driver;
        tty_set_operations(pty_driver, &master_pty_ops_bsd);
 
-       pty_slave_driver->owner = THIS_MODULE;
        pty_slave_driver->driver_name = "pty_slave";
        pty_slave_driver->name = "ttyp";
        pty_slave_driver->major = PTY_SLAVE_MAJOR;
@@ -611,6 +607,9 @@ static int ptmx_open(struct inode *inode, struct file *filp)
 
        nonseekable_open(inode, filp);
 
+       /* We refuse fsnotify events on ptmx, since it's a shared resource */
+       filp->f_mode |= FMODE_NONOTIFY;
+
        retval = tty_alloc_file(filp);
        if (retval)
                return retval;
@@ -671,7 +670,6 @@ static void __init unix98_pty_init(void)
        if (!pts_driver)
                panic("Couldn't allocate Unix98 pts driver");
 
-       ptm_driver->owner = THIS_MODULE;
        ptm_driver->driver_name = "pty_master";
        ptm_driver->name = "ptm";
        ptm_driver->major = UNIX98_PTY_MASTER_MAJOR;
@@ -690,7 +688,6 @@ static void __init unix98_pty_init(void)
        ptm_driver->other = pts_driver;
        tty_set_operations(ptm_driver, &ptm_unix98_ops);
 
-       pts_driver->owner = THIS_MODULE;
        pts_driver->driver_name = "pty_slave";
        pts_driver->name = "pts";
        pts_driver->major = UNIX98_PTY_SLAVE_MAJOR;