Skip to content

Commit f73f333

Browse files
committed
ASoC: SOF: debug: use simple_open()
Detected with Coccinelle sound/soc/sof/debug.c:19:11-28: WARNING opportunity for simple_open, see also structure on line 82 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 parent a988c10 commit f73f333

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

sound/soc/sof/debug.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@
1616
#include <linux/pm_runtime.h>
1717
#include "sof-priv.h"
1818

19-
static int sof_dfsentry_open(struct inode *inode, struct file *file)
20-
{
21-
file->private_data = inode->i_private;
22-
23-
return 0;
24-
}
25-
2619
static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
2720
size_t count, loff_t *ppos)
2821
{
@@ -79,7 +72,7 @@ static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
7972
}
8073

8174
static const struct file_operations sof_dfs_fops = {
82-
.open = sof_dfsentry_open,
75+
.open = simple_open,
8376
.read = sof_dfsentry_read,
8477
.llseek = default_llseek,
8578
};

0 commit comments

Comments
 (0)