Skip to content

Commit 93ecbd6

Browse files
Wei Yongjunlinvjw
authored andcommitted
wil6210: convert to use simple_open()
This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 1887417 commit 93ecbd6

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

‎drivers/net/wireless/ath/wil6210/debugfs.c‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,6 @@ static const struct file_operations fops_memread = {
312312
.llseek = seq_lseek,
313313
};
314314

315-
static int wil_default_open(struct inode *inode, struct file *file)
316-
{
317-
if (inode->i_private)
318-
file->private_data = inode->i_private;
319-
320-
return 0;
321-
}
322-
323315
static ssize_t wil_read_file_ioblob(struct file *file, char __user *user_buf,
324316
size_t count, loff_t *ppos)
325317
{
@@ -361,7 +353,7 @@ static ssize_t wil_read_file_ioblob(struct file *file, char __user *user_buf,
361353

362354
static const struct file_operations fops_ioblob = {
363355
.read = wil_read_file_ioblob,
364-
.open = wil_default_open,
356+
.open = simple_open,
365357
.llseek = default_llseek,
366358
};
367359

@@ -396,7 +388,7 @@ static ssize_t wil_write_file_reset(struct file *file, const char __user *buf,
396388

397389
static const struct file_operations fops_reset = {
398390
.write = wil_write_file_reset,
399-
.open = wil_default_open,
391+
.open = simple_open,
400392
};
401393
/*---------Tx descriptor------------*/
402394

@@ -526,7 +518,7 @@ static ssize_t wil_write_file_ssid(struct file *file, const char __user *buf,
526518
static const struct file_operations fops_ssid = {
527519
.read = wil_read_file_ssid,
528520
.write = wil_write_file_ssid,
529-
.open = wil_default_open,
521+
.open = simple_open,
530522
};
531523

532524
/*----------------*/

0 commit comments

Comments
 (0)