drm/komeda: Convert to DEFINE_SHOW_ATTRIBUTE
Subsystems (4)
PATCH v2 1/1 drm/komeda: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by Qinglang Miao <[email protected]>
---
v2: based on linux-next(20200917), and can be applied to
mainline cleanly now.
drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_dev.c +1 -12
@@ -41,18 +41,7 @@ static int komeda_register_show(struct seq_file *sf, void *x)return 0 ; } -static int komeda_register_open (struct inode *inode,struct file *filp) -{ -return single_open (filp, komeda_register_show, inode->i_private); -} - -static const struct file_operations komeda_register_fops = { - .owner =THIS_MODULE , - .open = komeda_register_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE (komeda_register);#ifdef CONFIG_DEBUG_FS static void komeda_debugfs_init (struct komeda_dev *mdev)
Signature · 1 line
2.23.0
Quoted 21 lines · Qinglang Miao
Use
DEFINE_SHOW_ATTRIBUTEmacro to simplify the code.Signed-off-by Qinglang Miao <[email protected]>---
v2: based on linux-next(20200917), and can be applied to
mainline cleanly now.drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)drivers/gpu/drm/arm/display/komeda/komeda_dev.c +0
-3@@ -41,18 +41,7 @@ static int komeda_register_show(struct seq_file *sf, void *x)return 0 ; } -static int komeda_register_open (struct inode *inode,struct file *filp) -{ -return single_open (filp, komeda_register_show, inode->i_private);
drivers/gpu/drm/arm/display/komeda/komeda_dev.c static int komeda_register_show(struct seq_file *sf, void *x) · line 44
Quoted 10 lines
drivers/gpu/drm/arm/display/komeda/komeda_dev.c +1
-9-} - -static const struct file_operations komeda_register_fops = { - .owner =THIS_MODULE , - .open = komeda_register_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE (komeda_register);
Hi Qinglang,
Sorry for the belated response!
Acked-by Liviu Dudau <[email protected]>
Best regards,
Liviu
Quoted 6 lines
drivers/gpu/drm/arm/display/komeda/komeda_dev.c +0
-0#ifdef CONFIG_DEBUG_FS static void komeda_debugfs_init (struct komeda_dev *mdev)Signature · 1 line
2.23.0
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯