From 2796b43feeeaf2d74998e42d1fddcefed6955f54 Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Sat, 1 Dec 2018 12:05:30 -0500 Subject: misc: remove GENWQE_DEBUGFS_RO() We already have the DEFINE_SHOW_ATTRIBUTE.There is no need to define such a macro,so remove GENWQE_DEBUGFS_RO.Also use DEFINE_SHOW_ATTRIBUTE to simplify some code. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman --- drivers/misc/vmw_balloon.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/misc/vmw_balloon.c') diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 9b0b3fa4f836..e43cec7f3a86 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -1470,18 +1470,7 @@ static int vmballoon_debug_show(struct seq_file *f, void *offset) return 0; } -static int vmballoon_debug_open(struct inode *inode, struct file *file) -{ - return single_open(file, vmballoon_debug_show, inode->i_private); -} - -static const struct file_operations vmballoon_debug_fops = { - .owner = THIS_MODULE, - .open = vmballoon_debug_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(vmballoon_debug); static int __init vmballoon_debugfs_init(struct vmballoon *b) { -- cgit v1.2.3