]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/devpts/inode.c
TTY: devpts, don't care about TTY in devpts_get_tty
[karo-tx-linux.git] / fs / devpts / inode.c
index 14afbabe65464e226549894404ec1af9d1a3f747..47965807884d553f29310e772f3767c37ca31caa 100644 (file)
@@ -593,10 +593,10 @@ int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty)
        return ret;
 }
 
-struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number)
+void *devpts_get_priv(struct inode *pts_inode)
 {
        struct dentry *dentry;
-       struct tty_struct *tty;
+       void *priv = NULL;
 
        BUG_ON(pts_inode->i_rdev == MKDEV(TTYAUX_MAJOR, PTMX_MINOR));
 
@@ -605,13 +605,12 @@ struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number)
        if (!dentry)
                return NULL;
 
-       tty = NULL;
        if (pts_inode->i_sb->s_magic == DEVPTS_SUPER_MAGIC)
-               tty = (struct tty_struct *)pts_inode->i_private;
+               priv = pts_inode->i_private;
 
        dput(dentry);
 
-       return tty;
+       return priv;
 }
 
 void devpts_pty_kill(struct tty_struct *tty)