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/mmc/core/sdio_uart.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/mmc/core/sdio_uart.c')
-rw-r--r-- | drivers/mmc/core/sdio_uart.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/mmc/core/sdio_uart.c b/drivers/mmc/core/sdio_uart.c index d3c91f412b69..25e113001a3c 100644 --- a/drivers/mmc/core/sdio_uart.c +++ b/drivers/mmc/core/sdio_uart.c | |||
@@ -1008,19 +1008,6 @@ static int sdio_uart_proc_show(struct seq_file *m, void *v) | |||
1008 | return 0; | 1008 | return 0; |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | static int sdio_uart_proc_open(struct inode *inode, struct file *file) | ||
1012 | { | ||
1013 | return single_open(file, sdio_uart_proc_show, NULL); | ||
1014 | } | ||
1015 | |||
1016 | static const struct file_operations sdio_uart_proc_fops = { | ||
1017 | .owner = THIS_MODULE, | ||
1018 | .open = sdio_uart_proc_open, | ||
1019 | .read = seq_read, | ||
1020 | .llseek = seq_lseek, | ||
1021 | .release = single_release, | ||
1022 | }; | ||
1023 | |||
1024 | static const struct tty_port_operations sdio_uart_port_ops = { | 1011 | static const struct tty_port_operations sdio_uart_port_ops = { |
1025 | .dtr_rts = uart_dtr_rts, | 1012 | .dtr_rts = uart_dtr_rts, |
1026 | .carrier_raised = uart_carrier_raised, | 1013 | .carrier_raised = uart_carrier_raised, |
@@ -1045,7 +1032,7 @@ static const struct tty_operations sdio_uart_ops = { | |||
1045 | .tiocmset = sdio_uart_tiocmset, | 1032 | .tiocmset = sdio_uart_tiocmset, |
1046 | .install = sdio_uart_install, | 1033 | .install = sdio_uart_install, |
1047 | .cleanup = sdio_uart_cleanup, | 1034 | .cleanup = sdio_uart_cleanup, |
1048 | .proc_fops = &sdio_uart_proc_fops, | 1035 | .proc_show = sdio_uart_proc_show, |
1049 | }; | 1036 | }; |
1050 | 1037 | ||
1051 | static struct tty_driver *sdio_uart_tty_driver; | 1038 | static struct tty_driver *sdio_uart_tty_driver; |