* [RESEND] staging: unisys: convert to DEFINE_SHOW_ATTRIBUTE
@ 2018-12-15 8:59 Yangtao Li
0 siblings, 0 replies; only message in thread
From: Yangtao Li @ 2018-12-15 8:59 UTC (permalink / raw)
To: david.kershner, gregkh, keescook
Cc: sparmaintainer, devel, linux-kernel, Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/staging/unisys/visorhba/visorhba_main.c | 14 +-------------
1 file changed, 1 insertion(+), 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
--
2.17.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-15 8:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-15 8:59 [RESEND] staging: unisys: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).