Commit 45170766 authored by Qinglang Miao's avatar Qinglang Miao Committed by Paul Mackerras

KVM: PPC: Book3S HV: XIVE: Convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
parent 35dfb43c
...@@ -1227,17 +1227,7 @@ static int xive_native_debug_show(struct seq_file *m, void *private) ...@@ -1227,17 +1227,7 @@ static int xive_native_debug_show(struct seq_file *m, void *private)
return 0; return 0;
} }
static int xive_native_debug_open(struct inode *inode, struct file *file) DEFINE_SHOW_ATTRIBUTE(xive_native_debug);
{
return single_open(file, xive_native_debug_show, inode->i_private);
}
static const struct file_operations xive_native_debug_fops = {
.open = xive_native_debug_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static void xive_native_debugfs_init(struct kvmppc_xive *xive) static void xive_native_debugfs_init(struct kvmppc_xive *xive)
{ {
......
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