summaryrefslogtreecommitdiff
path: root/arch/sh/mm/pmb.c
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-19 10:52:05 +0800
committerRich Felker <dalias@libc.org>2021-01-06 19:55:24 -0500
commita1153636e904faf2b30fae3fb6ee3f4f4d0175c8 (patch)
tree0ecd6c0dd69294e3fa53fccc0ab7e476f6e441a8 /arch/sh/mm/pmb.c
parent5c5dc5f8dccbafaacc8c97bbe7762986bdda6f63 (diff)
sh: mm: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Rich Felker <dalias@libc.org>
Diffstat (limited to 'arch/sh/mm/pmb.c')
-rw-r--r--arch/sh/mm/pmb.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index b20aba6e1b37..68eb7cc6e564 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -812,7 +812,7 @@ bool __in_29bit_mode(void)
return (__raw_readl(PMB_PASCR) & PASCR_SE) == 0;
}
-static int pmb_seq_show(struct seq_file *file, void *iter)
+static int pmb_debugfs_show(struct seq_file *file, void *iter)
{
int i;
@@ -846,18 +846,7 @@ static int pmb_seq_show(struct seq_file *file, void *iter)
return 0;
}
-static int pmb_debugfs_open(struct inode *inode, struct file *file)
-{
- return single_open(file, pmb_seq_show, NULL);
-}
-
-static const struct file_operations pmb_debugfs_fops = {
- .owner = THIS_MODULE,
- .open = pmb_debugfs_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(pmb_debugfs);
static int __init pmb_debugfs_init(void)
{