diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-17 20:39:49 +0800 |
---|---|---|
committer | Liviu Dudau <liviu.dudau@arm.com> | 2020-10-23 13:52:15 +0100 |
commit | ef52d5853bf1d0ac1254a8d44e5b8f4edc274960 (patch) | |
tree | 1c01c5b0087e3254d9d293fadd46ab5972010ee1 /drivers/gpu/drm/arm | |
parent | cc07057c7c88fb8eff3b1991131ded0f0bcfa7e3 (diff) |
drm/komeda: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Tested-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200917123949.101925-1-miaoqinglang@huawei.com
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r-- | drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c index 03980211c48a..1f8195bad536 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c @@ -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) |