diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-13 21:25:54 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 07:24:30 +0200 |
commit | ec7d9c9ce897174243af4fcd201dbfc34df0f3a3 (patch) | |
tree | b8d010de43bd1a5b1faefd204b3d2447502bb0e4 /drivers/ide/ide-cd.c | |
parent | 61fb5c043f92f5be4612b7511dcaf3f3fe6ab4c1 (diff) | |
download | talos-op-linux-ec7d9c9ce897174243af4fcd201dbfc34df0f3a3.tar.gz talos-op-linux-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-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 5a8e8e3c22cd..b52a7bdace52 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1426,21 +1426,8 @@ static int idecd_capacity_proc_show(struct seq_file *m, void *v) return 0; } -static int idecd_capacity_proc_open(struct inode *inode, struct file *file) -{ - return single_open(file, idecd_capacity_proc_show, PDE_DATA(inode)); -} - -static const struct file_operations idecd_capacity_proc_fops = { - .owner = THIS_MODULE, - .open = idecd_capacity_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - static ide_proc_entry_t idecd_proc[] = { - { "capacity", S_IFREG|S_IRUGO, &idecd_capacity_proc_fops }, + { "capacity", S_IFREG|S_IRUGO, idecd_capacity_proc_show }, {} }; |