Commit f6cee260 authored by Yangtao Li's avatar Yangtao Li Committed by Michael Ellerman

powerpc/fadump: Change to use DEFINE_SHOW_ATTRIBUTE macro

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Reviewed-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 267acedf
...@@ -1531,17 +1531,7 @@ static struct kobj_attribute fadump_register_attr = __ATTR(fadump_registered, ...@@ -1531,17 +1531,7 @@ static struct kobj_attribute fadump_register_attr = __ATTR(fadump_registered,
0644, fadump_register_show, 0644, fadump_register_show,
fadump_register_store); fadump_register_store);
static int fadump_region_open(struct inode *inode, struct file *file) DEFINE_SHOW_ATTRIBUTE(fadump_region);
{
return single_open(file, fadump_region_show, inode->i_private);
}
static const struct file_operations fadump_region_fops = {
.open = fadump_region_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static void fadump_init_files(void) static void fadump_init_files(void)
{ {
......
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