Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 9074/1: ptdump: convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

authored by

Jisheng Zhang (syna) and committed by
Russell King
5fafafe7 a5e8acd9

+1 -12
+1 -12
arch/arm/mm/ptdump_debugfs.c
··· 11 11 ptdump_walk_pgd(m, info); 12 12 return 0; 13 13 } 14 - 15 - static int ptdump_open(struct inode *inode, struct file *file) 16 - { 17 - return single_open(file, ptdump_show, inode->i_private); 18 - } 19 - 20 - static const struct file_operations ptdump_fops = { 21 - .open = ptdump_open, 22 - .read = seq_read, 23 - .llseek = seq_lseek, 24 - .release = single_release, 25 - }; 14 + DEFINE_SHOW_ATTRIBUTE(ptdump); 26 15 27 16 void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name) 28 17 {