diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2018-12-15 03:59:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-17 14:24:11 +0100 |
commit | 2be13945966afc600360b2fe146dde75b0f443ab (patch) | |
tree | fa2a744cae66cee6076fe6f17357c80ffcb3c053 /drivers/staging/unisys | |
parent | staging: fwserial: convert to DEFINE_SHOW_ATTRIBUTE (diff) | |
download | linux-dev-2be13945966afc600360b2fe146dde75b0f443ab.tar.xz linux-dev-2be13945966afc600360b2fe146dde75b0f443ab.zip |
staging: unisys: convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visorhba/visorhba_main.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 4fc521c51c0e..d0fed63c13a2 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -681,19 +681,7 @@ static int info_debugfs_show(struct seq_file *seq, void *v) return 0; } - -static int info_debugfs_open(struct inode *inode, struct file *file) -{ - return single_open(file, info_debugfs_show, inode->i_private); -} - -static const struct file_operations info_debugfs_fops = { - .owner = THIS_MODULE, - .open = info_debugfs_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(info_debugfs); /* * complete_taskmgmt_command - Complete task management |