diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-10-18 16:26:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-22 19:50:13 -0400 |
commit | f11afb61247016162aa92225a337c1575556c9d9 (patch) | |
tree | ba77670c1ac540bb284e6975d6996b21ad23a272 /include/linux/devpts_fs.h | |
parent | 162b97cfa21f816f39ede1944f2a4220e3cf8969 (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.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h index 4ca846f16fe5..251a2090a554 100644 --- a/include/linux/devpts_fs.h +++ b/include/linux/devpts_fs.h | |||
@@ -20,11 +20,12 @@ | |||
20 | int devpts_new_index(struct inode *ptmx_inode); | 20 | int devpts_new_index(struct inode *ptmx_inode); |
21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); | 21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); |
22 | /* mknod in devpts */ | 22 | /* mknod in devpts */ |
23 | struct inode *devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty); | 23 | struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index, |
24 | void *priv); | ||
24 | /* get private structure */ | 25 | /* get private structure */ |
25 | void *devpts_get_priv(struct inode *pts_inode); | 26 | void *devpts_get_priv(struct inode *pts_inode); |
26 | /* unlink */ | 27 | /* unlink */ |
27 | void devpts_pty_kill(struct tty_struct *tty); | 28 | void devpts_pty_kill(struct inode *inode); |
28 | 29 | ||
29 | #else | 30 | #else |
30 | 31 | ||
@@ -32,7 +33,7 @@ void devpts_pty_kill(struct tty_struct *tty); | |||
32 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } | 33 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } |
33 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } | 34 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } |
34 | static inline struct inode *devpts_pty_new(struct inode *ptmx_inode, | 35 | static inline struct inode *devpts_pty_new(struct inode *ptmx_inode, |
35 | struct tty_struct *tty) | 36 | dev_t device, int index, void *priv) |
36 | { | 37 | { |
37 | return ERR_PTR(-EINVAL); | 38 | return ERR_PTR(-EINVAL); |
38 | } | 39 | } |
@@ -40,7 +41,7 @@ static inline void *devpts_get_priv(struct inode *pts_inode) | |||
40 | { | 41 | { |
41 | return NULL; | 42 | return NULL; |
42 | } | 43 | } |
43 | static inline void devpts_pty_kill(struct tty_struct *tty) { } | 44 | static inline void devpts_pty_kill(struct inode *inode) { } |
44 | 45 | ||
45 | #endif | 46 | #endif |
46 | 47 | ||