aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/aspeed
diff options
context:
space:
mode:
authorGravatar Liu Shixin <liushixin2@huawei.com> 2022-09-22 22:30:38 +0800
committerGravatar Hans Verkuil <hverkuil-cisco@xs4all.nl> 2022-10-24 19:03:52 +0200
commit1733197b71aae2f725357720e662be572d220fb3 (patch)
tree3f1668a934f67aaea263d8d9a378303261d86f52 /drivers/media/platform/aspeed
parentmedia: zoran: remove unused declarations in zoran_device.h (diff)
downloadlinux-1733197b71aae2f725357720e662be572d220fb3.tar.gz
linux-1733197b71aae2f725357720e662be572d220fb3.tar.bz2
linux-1733197b71aae2f725357720e662be572d220fb3.zip
media: aspeed: use DEFINE_SHOW_ATTRIBUTE to simplify code
Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/aspeed')
-rw-r--r--drivers/media/platform/aspeed/aspeed-video.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
index 20f795ccc11b..26f067c77217 100644
--- a/drivers/media/platform/aspeed/aspeed-video.c
+++ b/drivers/media/platform/aspeed/aspeed-video.c
@@ -1753,19 +1753,7 @@ static int aspeed_video_debugfs_show(struct seq_file *s, void *data)
return 0;
}
-
-static int aspeed_video_proc_open(struct inode *inode, struct file *file)
-{
- return single_open(file, aspeed_video_debugfs_show, inode->i_private);
-}
-
-static const struct file_operations aspeed_video_debugfs_ops = {
- .owner = THIS_MODULE,
- .open = aspeed_video_proc_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(aspeed_video_debugfs);
static struct dentry *debugfs_entry;
@@ -1779,7 +1767,7 @@ static int aspeed_video_debugfs_create(struct aspeed_video *video)
{
debugfs_entry = debugfs_create_file(DEVICE_NAME, 0444, NULL,
video,
- &aspeed_video_debugfs_ops);
+ &aspeed_video_debugfs_fops);
if (!debugfs_entry)
aspeed_video_debugfs_remove(video);