Commit 5953c887 authored by Yangtao Li's avatar Yangtao Li Committed by Santosh Shilimkar

firmware: ti_sci: Change to use DEFINE_SHOW_ATTRIBUTE macro

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Reviewed-by: default avatarNishanth Menon <nm@ti.com>
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
parent 1c7fc5cb
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment