summaryrefslogtreecommitdiffstats
path: root/drivers/tty/synclink.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-13 21:04:45 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-16 07:24:30 +0200
commit8a8dcabffb991a08fa1fab4e75b80a9075825606 (patch)
treedb9d836b96716c68104ab6c82d6a18912d0b3c84 /drivers/tty/synclink.c
parentec7d9c9ce897174243af4fcd201dbfc34df0f3a3 (diff)
downloadop-kernel-dev-8a8dcabffb991a08fa1fab4e75b80a9075825606.zip
op-kernel-dev-8a8dcabffb991a08fa1fab4e75b80a9075825606.tar.gz
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/synclink.c')
-rw-r--r--drivers/tty/synclink.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index 3c4ad71..fbdf4d0 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -3534,19 +3534,6 @@ static int mgsl_proc_show(struct seq_file *m, void *v)
return 0;
}
-static int mgsl_proc_open(struct inode *inode, struct file *file)
-{
- return single_open(file, mgsl_proc_show, NULL);
-}
-
-static const struct file_operations mgsl_proc_fops = {
- .owner = THIS_MODULE,
- .open = mgsl_proc_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
/* mgsl_allocate_dma_buffers()
*
* Allocate and format DMA buffers (ISA adapter)
@@ -4298,7 +4285,7 @@ static const struct tty_operations mgsl_ops = {
.tiocmget = tiocmget,
.tiocmset = tiocmset,
.get_icount = msgl_get_icount,
- .proc_fops = &mgsl_proc_fops,
+ .proc_show = mgsl_proc_show,
};
/*
OpenPOWER on IntegriCloud