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 /drivers/tty/cyclades.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 'drivers/tty/cyclades.c')
-rw-r--r-- | drivers/tty/cyclades.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c index cf0bde3bb927..6d3c58051ce3 100644 --- a/drivers/tty/cyclades.c +++ b/drivers/tty/cyclades.c | |||
@@ -3972,19 +3972,6 @@ static int cyclades_proc_show(struct seq_file *m, void *v) | |||
3972 | return 0; | 3972 | return 0; |
3973 | } | 3973 | } |
3974 | 3974 | ||
3975 | static int cyclades_proc_open(struct inode *inode, struct file *file) | ||
3976 | { | ||
3977 | return single_open(file, cyclades_proc_show, NULL); | ||
3978 | } | ||
3979 | |||
3980 | static const struct file_operations cyclades_proc_fops = { | ||
3981 | .owner = THIS_MODULE, | ||
3982 | .open = cyclades_proc_open, | ||
3983 | .read = seq_read, | ||
3984 | .llseek = seq_lseek, | ||
3985 | .release = single_release, | ||
3986 | }; | ||
3987 | |||
3988 | /* The serial driver boot-time initialization code! | 3975 | /* The serial driver boot-time initialization code! |
3989 | Hardware I/O ports are mapped to character special devices on a | 3976 | Hardware I/O ports are mapped to character special devices on a |
3990 | first found, first allocated manner. That is, this code searches | 3977 | first found, first allocated manner. That is, this code searches |
@@ -4024,7 +4011,7 @@ static const struct tty_operations cy_ops = { | |||
4024 | .tiocmget = cy_tiocmget, | 4011 | .tiocmget = cy_tiocmget, |
4025 | .tiocmset = cy_tiocmset, | 4012 | .tiocmset = cy_tiocmset, |
4026 | .get_icount = cy_get_icount, | 4013 | .get_icount = cy_get_icount, |
4027 | .proc_fops = &cyclades_proc_fops, | 4014 | .proc_show = cyclades_proc_show, |
4028 | }; | 4015 | }; |
4029 | 4016 | ||
4030 | static int __init cy_init(void) | 4017 | static int __init cy_init(void) |