summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/ptdump/hashpagetable.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-07-08 16:49:40 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-08-25 13:35:48 +1000
commit11f27a7fa4ca27935de74e3eb052bdc430d5f8d8 (patch)
treeeba522d121682ead120a643c942ff24ca9dea551 /arch/powerpc/mm/ptdump/hashpagetable.c
parent33e1402435cb9f3021439a15935ea2dc69ec1844 (diff)
downloadlinux-11f27a7fa4ca27935de74e3eb052bdc430d5f8d8.tar.bz2
powerpc/ptdump: Use DEFINE_SHOW_ATTRIBUTE()
Use DEFINE_SHOW_ATTRIBUTE() instead of open coding open() and fops. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/b864a92693ca8413ef0b19f0c12065c212899b6e.1625762905.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm/ptdump/hashpagetable.c')
-rw-r--r--arch/powerpc/mm/ptdump/hashpagetable.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c b/arch/powerpc/mm/ptdump/hashpagetable.c
index ad6df9a2e7c8..c7f824d294b2 100644
--- a/arch/powerpc/mm/ptdump/hashpagetable.c
+++ b/arch/powerpc/mm/ptdump/hashpagetable.c
@@ -526,17 +526,7 @@ static int ptdump_show(struct seq_file *m, void *v)
return 0;
}
-static int ptdump_open(struct inode *inode, struct file *file)
-{
- return single_open(file, ptdump_show, NULL);
-}
-
-static const struct file_operations ptdump_fops = {
- .open = ptdump_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(ptdump);
static int ptdump_init(void)
{