All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro
@ 2018-11-22 14:05 ` Yangtao Li
  0 siblings, 0 replies; 6+ messages in thread
From: Yangtao Li @ 2018-11-22 14:05 UTC (permalink / raw)
  To: linux-arm-kernel

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/firmware/ti_sci.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 69ed1464175c..3fbbb61012c4 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -146,25 +146,8 @@ static int ti_sci_debug_show(struct seq_file *s, void *unused)
 	return 0;
 }
 
-/**
- * ti_sci_debug_open() - debug file open
- * @inode:	inode pointer
- * @file:	file pointer
- *
- * Return: result of single_open
- */
-static int ti_sci_debug_open(struct inode *inode, struct file *file)
-{
-	return single_open(file, ti_sci_debug_show, inode->i_private);
-}
-
-/* log file operations */
-static const struct file_operations ti_sci_debug_fops = {
-	.open = ti_sci_debug_open,
-	.read = seq_read,
-	.llseek = seq_lseek,
-	.release = single_release,
-};
+/* Provide the log file operations interface*/
+DEFINE_SHOW_ATTRIBUTE(ti_sci_debug);
 
 /**
  * ti_sci_debugfs_create() - Create log debug file
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-09  4:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-22 14:05 [PATCH] firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
2018-11-22 14:05 ` Yangtao Li
2018-12-08 16:04 ` Nishanth Menon
2018-12-08 16:04   ` Nishanth Menon
2018-12-09  4:26   ` Santosh Shilimkar
2018-12-09  4:26     ` Santosh Shilimkar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.