Skip to contentSkip to conversation

staging: unisys: convert to DEFINE_SHOW_ATTRIBUTE

PATCH RESEND Superseded Yangtao Li 1 participant 1 message Dec 15, 2018 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yangtao Li

author
#0 lore raw

PATCH RESEND 1/1 staging: unisys: convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

---
 drivers/staging/unisys/visorhba/visorhba_main.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/staging/unisys/visorhba/visorhba_main.c +1 -13
index 4fc521c51c0e..d0fed63c13a2 100644
@@ -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
Signature · 1 line
2.17.0