diff options
Diffstat (limited to 'fs/devpts')
-rw-r--r-- | fs/devpts/inode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 14afbabe6546..47965807884d 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -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) |