summaryrefslogtreecommitdiffstats
path: root/include/linux/devpts_fs.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-10-18 22:26:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-22 16:50:13 -0700
commitf11afb61247016162aa92225a337c1575556c9d9 (patch)
treeba77670c1ac540bb284e6975d6996b21ad23a272 /include/linux/devpts_fs.h
parent162b97cfa21f816f39ede1944f2a4220e3cf8969 (diff)
TTY: devpts, do not set driver_data
The goal is to stop setting and using tty->driver_data in devpts code. It should be used solely by the driver's code, pty in this case. Now driver_data are managed only in the pty driver. devpts_pty_new is switched to accept what we used to dig out of tty_struct, i.e. device node number and index. This also removes a note about driver_data being set outside of the driver. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/devpts_fs.h')
-rw-r--r--include/linux/devpts_fs.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h
index 4ca846f16fe..251a2090a55 100644
--- a/include/linux/devpts_fs.h
+++ b/include/linux/devpts_fs.h
@@ -20,11 +20,12 @@
int devpts_new_index(struct inode *ptmx_inode);
void devpts_kill_index(struct inode *ptmx_inode, int idx);
/* mknod in devpts */
-struct inode *devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty);
+struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index,
+ void *priv);
/* get private structure */
void *devpts_get_priv(struct inode *pts_inode);
/* unlink */
-void devpts_pty_kill(struct tty_struct *tty);
+void devpts_pty_kill(struct inode *inode);
#else
@@ -32,7 +33,7 @@ void devpts_pty_kill(struct tty_struct *tty);
static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; }
static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { }
static inline struct inode *devpts_pty_new(struct inode *ptmx_inode,
- struct tty_struct *tty)
+ dev_t device, int index, void *priv)
{
return ERR_PTR(-EINVAL);
}
@@ -40,7 +41,7 @@ static inline void *devpts_get_priv(struct inode *pts_inode)
{
return NULL;
}
-static inline void devpts_pty_kill(struct tty_struct *tty) { }
+static inline void devpts_pty_kill(struct inode *inode) { }
#endif