aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-08-24 09:50:03 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-25 19:40:38 -0400
commit7a95e94ce0c255327eb8acb07241a95f3250b54b (patch)
tree829d12be41884538a5e45560c8bddbce0b88cca2
parenta52e95abf772b43c9226e9a72d3c1353903ba96f (diff)
ibmvnic: 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 <weiyongjun1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index b942108c85c1..e8625309bfb2 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2779,12 +2779,6 @@ static void handle_control_ras_rsp(union ibmvnic_crq *crq,
2779 } 2779 }
2780} 2780}
2781 2781
2782static int ibmvnic_fw_comp_open(struct inode *inode, struct file *file)
2783{
2784 file->private_data = inode->i_private;
2785 return 0;
2786}
2787
2788static ssize_t trace_read(struct file *file, char __user *user_buf, size_t len, 2782static ssize_t trace_read(struct file *file, char __user *user_buf, size_t len,
2789 loff_t *ppos) 2783 loff_t *ppos)
2790{ 2784{
@@ -2836,7 +2830,7 @@ static ssize_t trace_read(struct file *file, char __user *user_buf, size_t len,
2836 2830
2837static const struct file_operations trace_ops = { 2831static const struct file_operations trace_ops = {
2838 .owner = THIS_MODULE, 2832 .owner = THIS_MODULE,
2839 .open = ibmvnic_fw_comp_open, 2833 .open = simple_open,
2840 .read = trace_read, 2834 .read = trace_read,
2841}; 2835};
2842 2836
@@ -2886,7 +2880,7 @@ static ssize_t paused_write(struct file *file, const char __user *user_buf,
2886 2880
2887static const struct file_operations paused_ops = { 2881static const struct file_operations paused_ops = {
2888 .owner = THIS_MODULE, 2882 .owner = THIS_MODULE,
2889 .open = ibmvnic_fw_comp_open, 2883 .open = simple_open,
2890 .read = paused_read, 2884 .read = paused_read,
2891 .write = paused_write, 2885 .write = paused_write,
2892}; 2886};
@@ -2934,7 +2928,7 @@ static ssize_t tracing_write(struct file *file, const char __user *user_buf,
2934 2928
2935static const struct file_operations tracing_ops = { 2929static const struct file_operations tracing_ops = {
2936 .owner = THIS_MODULE, 2930 .owner = THIS_MODULE,
2937 .open = ibmvnic_fw_comp_open, 2931 .open = simple_open,
2938 .read = tracing_read, 2932 .read = tracing_read,
2939 .write = tracing_write, 2933 .write = tracing_write,
2940}; 2934};
@@ -2987,7 +2981,7 @@ static ssize_t error_level_write(struct file *file, const char __user *user_buf,
2987 2981
2988static const struct file_operations error_level_ops = { 2982static const struct file_operations error_level_ops = {
2989 .owner = THIS_MODULE, 2983 .owner = THIS_MODULE,
2990 .open = ibmvnic_fw_comp_open, 2984 .open = simple_open,
2991 .read = error_level_read, 2985 .read = error_level_read,
2992 .write = error_level_write, 2986 .write = error_level_write,
2993}; 2987};
@@ -3038,7 +3032,7 @@ static ssize_t trace_level_write(struct file *file, const char __user *user_buf,
3038 3032
3039static const struct file_operations trace_level_ops = { 3033static const struct file_operations trace_level_ops = {
3040 .owner = THIS_MODULE, 3034 .owner = THIS_MODULE,
3041 .open = ibmvnic_fw_comp_open, 3035 .open = simple_open,
3042 .read = trace_level_read, 3036 .read = trace_level_read,
3043 .write = trace_level_write, 3037 .write = trace_level_write,
3044}; 3038};
@@ -3091,7 +3085,7 @@ static ssize_t trace_buff_size_write(struct file *file,
3091 3085
3092static const struct file_operations trace_size_ops = { 3086static const struct file_operations trace_size_ops = {
3093 .owner = THIS_MODULE, 3087 .owner = THIS_MODULE,
3094 .open = ibmvnic_fw_comp_open, 3088 .open = simple_open,
3095 .read = trace_buff_size_read, 3089 .read = trace_buff_size_read,
3096 .write = trace_buff_size_write, 3090 .write = trace_buff_size_write,
3097}; 3091};