diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-03 09:43:24 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-03 09:43:24 -0800 |
commit | f3f950dba37b5bec870147aeb9878a157a6eb875 (patch) | |
tree | 63f34a78d74247358b4728bc5cb4a21ec727965c /drivers/ide/ide-proc.c | |
parent | 9099ff769faf879b5cb6e24e04c7904a8352aef0 (diff) | |
parent | 94d0fb159da94cb4522e14d6004bb7acf2ff0387 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Pull IDE fixes from David Miller:
"A missing of_node_put() and a small cleanup"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
ide: Change to use DEFINE_SHOW_ATTRIBUTE macro
ide: pmac: add of_node_put()
Diffstat (limited to 'drivers/ide/ide-proc.c')
-rw-r--r-- | drivers/ide/ide-proc.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 45c997430332..4c8c7a620d08 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c @@ -614,18 +614,7 @@ static int ide_drivers_show(struct seq_file *s, void *p) return 0; } -static int ide_drivers_open(struct inode *inode, struct file *file) -{ - return single_open(file, &ide_drivers_show, NULL); -} - -static const struct file_operations ide_drivers_operations = { - .owner = THIS_MODULE, - .open = ide_drivers_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(ide_drivers); void proc_ide_create(void) { @@ -634,7 +623,7 @@ void proc_ide_create(void) if (!proc_ide_root) return; - proc_create("drivers", 0, proc_ide_root, &ide_drivers_operations); + proc_create("drivers", 0, proc_ide_root, &ide_drivers_fops); } void proc_ide_destroy(void) |