cxgb4: Convert to use simple_open()
Subsystems (3)
PATCH 1/1 cxgb4: Convert to use simple_open()
From: Wei Yongjun <[email protected]>
Remove an open coded simple_open() function and replace file operations references to the function with simple_open() instead.
Generated by: scripts/coccinelle/api/simple_open.cocci
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c +1 -7
@@ -2748,12 +2748,6 @@ static void add_debugfs_mem(struct adapter *adap, const char *name, size_mb << 20); } -static int blocked_fl_open (struct inode *inode,struct file *file) -{ - file->private_data = inode->i_private; -return 0 ; -} -static ssize_t blocked_fl_read (struct file *filp,char __user *ubuf,size_t count,loff_t *ppos) {
@@ -2797,7 +2791,7 @@ static ssize_t blocked_fl_write(struct file *filp, const char __user *ubuf,static const struct file_operations blocked_fl_fops = { .owner =THIS_MODULE , - .open = blocked_fl_open, + .open = simple_open, .read = blocked_fl_read, .write = blocked_fl_write, .llseek = generic_file_llseek,
From: Wei Yongjun <[email protected]>
Date: Wed, 21 Sep 2016 15:09:16 +0000
Quoted 9 lines
From: Wei Yongjun <[email protected]>
Remove an open coded
simple_open()function and replace file operations references to the function withsimple_open()instead.Generated by:
scripts/coccinelle/api/simple_open.cocciSigned-off-by Wei Yongjun <[email protected]>
Applied.