diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-01-30 19:21:44 +0100 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@oracle.com> | 2019-01-30 19:22:16 +0100 |
commit | 5953c887fb5fd8de8b3b716485a0457b93ba4ce2 (patch) | |
tree | bfa830322d71a1705ab003cc6e44e4c79b9544f4 /drivers/firmware/ti_sci.c | |
parent | Linux 5.0-rc2 (diff) | |
download | linux-5953c887fb5fd8de8b3b716485a0457b93ba4ce2.tar.xz linux-5953c887fb5fd8de8b3b716485a0457b93ba4ce2.zip |
firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Reviewed-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Diffstat (limited to 'drivers/firmware/ti_sci.c')
-rw-r--r-- | drivers/firmware/ti_sci.c | 21 |
1 files 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 |