diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-19 04:29:25 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2020-09-22 04:53:55 +0300 |
commit | 4517076608c51c74966cf0c54bc66dada7dec223 (patch) | |
tree | efec681f78d17b0b4ff74ac25908e6ca95ce022d /arch/powerpc/kvm | |
parent | 35dfb43c243b28658ef757a2b9c6454f99cfc43c (diff) | |
download | linux-4517076608c51c74966cf0c54bc66dada7dec223.tar.xz |
KVM: PPC: Book3S HV: XIVE: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s_xive_native.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/powerpc/kvm/book3s_xive_native.c b/arch/powerpc/kvm/book3s_xive_native.c index bdea91df1497..d0c2db0e07fa 100644 --- a/arch/powerpc/kvm/book3s_xive_native.c +++ b/arch/powerpc/kvm/book3s_xive_native.c @@ -1227,17 +1227,7 @@ static int xive_native_debug_show(struct seq_file *m, void *private) return 0; } -static int xive_native_debug_open(struct inode *inode, struct file *file) -{ - 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, -}; +DEFINE_SHOW_ATTRIBUTE(xive_native_debug); static void xive_native_debugfs_init(struct kvmppc_xive *xive) { |