diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-13 22:04:45 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 08:24:30 +0300 |
commit | 8a8dcabffb991a08fa1fab4e75b80a9075825606 (patch) | |
tree | db9d836b96716c68104ab6c82d6a18912d0b3c84 /drivers/tty/amiserial.c | |
parent | ec7d9c9ce897174243af4fcd201dbfc34df0f3a3 (diff) | |
download | linux-8a8dcabffb991a08fa1fab4e75b80a9075825606.tar.xz |
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 'drivers/tty/amiserial.c')
-rw-r--r-- | drivers/tty/amiserial.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 32d7ce430b02..34dead614149 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c @@ -1566,19 +1566,6 @@ static int rs_proc_show(struct seq_file *m, void *v) return 0; } -static int rs_proc_open(struct inode *inode, struct file *file) -{ - return single_open(file, rs_proc_show, NULL); -} - -static const struct file_operations rs_proc_fops = { - .owner = THIS_MODULE, - .open = rs_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - /* * --------------------------------------------------------------------- * rs_init() and friends @@ -1620,7 +1607,7 @@ static const struct tty_operations serial_ops = { .tiocmget = rs_tiocmget, .tiocmset = rs_tiocmset, .get_icount = rs_get_icount, - .proc_fops = &rs_proc_fops, + .proc_show = rs_proc_show, }; static int amiga_carrier_raised(struct tty_port *port) |