mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
x86/xen: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Reviewed-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/20200917125547.104472-1-miaoqinglang@huawei.com Signed-off-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
parent
1c728719a4
commit
e34ff4cda2
1 changed files with 1 additions and 11 deletions
|
@ -795,17 +795,7 @@ static int p2m_dump_show(struct seq_file *m, void *v)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int p2m_dump_open(struct inode *inode, struct file *filp)
|
DEFINE_SHOW_ATTRIBUTE(p2m_dump);
|
||||||
{
|
|
||||||
return single_open(filp, p2m_dump_show, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct file_operations p2m_dump_fops = {
|
|
||||||
.open = p2m_dump_open,
|
|
||||||
.read = seq_read,
|
|
||||||
.llseek = seq_lseek,
|
|
||||||
.release = single_release,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct dentry *d_mmu_debug;
|
static struct dentry *d_mmu_debug;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue