diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-13 15:04:45 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 01:24:30 -0400 |
commit | 8a8dcabffb991a08fa1fab4e75b80a9075825606 (patch) | |
tree | db9d836b96716c68104ab6c82d6a18912d0b3c84 /fs/proc/proc_tty.c | |
parent | ec7d9c9ce897174243af4fcd201dbfc34df0f3a3 (diff) |
tty: replace ->proc_fops with ->proc_show
Just set up the show callback in the tty_operations, and use
proc_create_single_data to create the file without additional
boilerplace code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/proc/proc_tty.c')
-rw-r--r-- | fs/proc/proc_tty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index b1a4a8ddd246..c69ff191e5d8 100644 --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c | |||
@@ -135,11 +135,11 @@ void proc_tty_register_driver(struct tty_driver *driver) | |||
135 | struct proc_dir_entry *ent; | 135 | struct proc_dir_entry *ent; |
136 | 136 | ||
137 | if (!driver->driver_name || driver->proc_entry || | 137 | if (!driver->driver_name || driver->proc_entry || |
138 | !driver->ops->proc_fops) | 138 | !driver->ops->proc_show) |
139 | return; | 139 | return; |
140 | 140 | ||
141 | ent = proc_create_data(driver->driver_name, 0, proc_tty_driver, | 141 | ent = proc_create_single_data(driver->driver_name, 0, proc_tty_driver, |
142 | driver->ops->proc_fops, driver); | 142 | driver->ops->proc_show, driver); |
143 | driver->proc_entry = ent; | 143 | driver->proc_entry = ent; |
144 | } | 144 | } |
145 | 145 | ||