Commit 524605e5 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

cxgb4: Convert to use simple_open()

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a084ab33
...@@ -2748,12 +2748,6 @@ static void add_debugfs_mem(struct adapter *adap, const char *name, ...@@ -2748,12 +2748,6 @@ static void add_debugfs_mem(struct adapter *adap, const char *name,
size_mb << 20); 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, static ssize_t blocked_fl_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -2797,7 +2791,7 @@ static ssize_t blocked_fl_write(struct file *filp, const char __user *ubuf, ...@@ -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 = { static const struct file_operations blocked_fl_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = blocked_fl_open, .open = simple_open,
.read = blocked_fl_read, .read = blocked_fl_read,
.write = blocked_fl_write, .write = blocked_fl_write,
.llseek = generic_file_llseek, .llseek = generic_file_llseek,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment