aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy_proc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-13 21:25:54 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-16 07:24:30 +0200
commitec7d9c9ce897174243af4fcd201dbfc34df0f3a3 (patch)
treeb8d010de43bd1a5b1faefd204b3d2447502bb0e4 /drivers/ide/ide-floppy_proc.c
parentide: remove ide_driver_proc_write (diff)
downloadlinux-dev-ec7d9c9ce897174243af4fcd201dbfc34df0f3a3.tar.xz
linux-dev-ec7d9c9ce897174243af4fcd201dbfc34df0f3a3.zip
ide: 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/ide/ide-floppy_proc.c')
-rw-r--r--drivers/ide/ide-floppy_proc.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/ide/ide-floppy_proc.c b/drivers/ide/ide-floppy_proc.c
index 471457ebea67..7f697ddb5fe5 100644
--- a/drivers/ide/ide-floppy_proc.c
+++ b/drivers/ide/ide-floppy_proc.c
@@ -14,22 +14,9 @@ static int idefloppy_capacity_proc_show(struct seq_file *m, void *v)
return 0;
}
-static int idefloppy_capacity_proc_open(struct inode *inode, struct file *file)
-{
- return single_open(file, idefloppy_capacity_proc_show, PDE_DATA(inode));
-}
-
-static const struct file_operations idefloppy_capacity_proc_fops = {
- .owner = THIS_MODULE,
- .open = idefloppy_capacity_proc_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
ide_proc_entry_t ide_floppy_proc[] = {
- { "capacity", S_IFREG|S_IRUGO, &idefloppy_capacity_proc_fops },
- { "geometry", S_IFREG|S_IRUGO, &ide_geometry_proc_fops },
+ { "capacity", S_IFREG|S_IRUGO, idefloppy_capacity_proc_show },
+ { "geometry", S_IFREG|S_IRUGO, ide_geometry_proc_show },
{}
};