Commit a42f82f5 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

mei: 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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 36eda94f
...@@ -24,12 +24,6 @@ ...@@ -24,12 +24,6 @@
#include "mei_dev.h" #include "mei_dev.h"
#include "hw.h" #include "hw.h"
static int mei_dbgfs_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
return 0;
}
static ssize_t mei_dbgfs_read_meclients(struct file *fp, char __user *ubuf, static ssize_t mei_dbgfs_read_meclients(struct file *fp, char __user *ubuf,
size_t cnt, loff_t *ppos) size_t cnt, loff_t *ppos)
{ {
...@@ -76,7 +70,7 @@ static ssize_t mei_dbgfs_read_meclients(struct file *fp, char __user *ubuf, ...@@ -76,7 +70,7 @@ static ssize_t mei_dbgfs_read_meclients(struct file *fp, char __user *ubuf,
} }
static const struct file_operations mei_dbgfs_fops_meclients = { static const struct file_operations mei_dbgfs_fops_meclients = {
.open = mei_dbgfs_open, .open = simple_open,
.read = mei_dbgfs_read_meclients, .read = mei_dbgfs_read_meclients,
.llseek = generic_file_llseek, .llseek = generic_file_llseek,
}; };
...@@ -100,7 +94,7 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf, ...@@ -100,7 +94,7 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf,
return ret; return ret;
} }
static const struct file_operations mei_dbgfs_fops_devstate = { static const struct file_operations mei_dbgfs_fops_devstate = {
.open = mei_dbgfs_open, .open = simple_open,
.read = mei_dbgfs_read_devstate, .read = mei_dbgfs_read_devstate,
.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