diff options
| author | Yangtao Li <tiny.windzz@gmail.com> | 2019-01-30 13:21:44 -0500 |
|---|---|---|
| committer | Santosh Shilimkar <santosh.shilimkar@oracle.com> | 2019-01-30 13:22:16 -0500 |
| commit | 5953c887fb5fd8de8b3b716485a0457b93ba4ce2 (patch) | |
| tree | bfa830322d71a1705ab003cc6e44e4c79b9544f4 /drivers/firmware | |
| parent | 1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8 (diff) | |
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')
| -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) | |||
| 146 | return 0; | 146 | return 0; |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | /** | 149 | /* Provide the log file operations interface*/ |
| 150 | * ti_sci_debug_open() - debug file open | 150 | DEFINE_SHOW_ATTRIBUTE(ti_sci_debug); |
| 151 | * @inode: inode pointer | ||
| 152 | * @file: file pointer | ||
| 153 | * | ||
| 154 | * Return: result of single_open | ||
| 155 | */ | ||
| 156 | static int ti_sci_debug_open(struct inode *inode, struct file *file) | ||
| 157 | { | ||
| 158 | return single_open(file, ti_sci_debug_show, inode->i_private); | ||
| 159 | } | ||
| 160 | |||
| 161 | /* log file operations */ | ||
| 162 | static const struct file_operations ti_sci_debug_fops = { | ||
| 163 | .open = ti_sci_debug_open, | ||
| 164 | .read = seq_read, | ||
| 165 | .llseek = seq_lseek, | ||
| 166 | .release = single_release, | ||
| 167 | }; | ||
| 168 | 151 | ||
| 169 | /** | 152 | /** |
| 170 | * ti_sci_debugfs_create() - Create log debug file | 153 | * ti_sci_debugfs_create() - Create log debug file |
