Skip to content

Commit 524605e

Browse files
Wei Yongjundavem330
authored andcommitted
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: Wei Yongjun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a084ab3 commit 524605e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,12 +2748,6 @@ static void add_debugfs_mem(struct adapter *adap, const char *name,
27482748
size_mb << 20);
27492749
}
27502750

2751-
static int blocked_fl_open(struct inode *inode, struct file *file)
2752-
{
2753-
file->private_data = inode->i_private;
2754-
return 0;
2755-
}
2756-
27572751
static ssize_t blocked_fl_read(struct file *filp, char __user *ubuf,
27582752
size_t count, loff_t *ppos)
27592753
{
@@ -2797,7 +2791,7 @@ static ssize_t blocked_fl_write(struct file *filp, const char __user *ubuf,
27972791

27982792
static const struct file_operations blocked_fl_fops = {
27992793
.owner = THIS_MODULE,
2800-
.open = blocked_fl_open,
2794+
.open = simple_open,
28012795
.read = blocked_fl_read,
28022796
.write = blocked_fl_write,
28032797
.llseek = generic_file_llseek,

0 commit comments

Comments
 (0)