aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-09 02:30:19 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 15:39:01 -0400
commita42f82f57a6411c89538a8c0a44150f67e449a4a (patch)
tree6b5ece8ba987d73743378c7f18a46bbf97db5cbe /drivers/misc
parent36eda94fcf936ccee5a8693af7738174a56be898 (diff)
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/debugfs.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/misc/mei/debugfs.c b/drivers/misc/mei/debugfs.c
index 7135a7186940..e3870f22d238 100644
--- a/drivers/misc/mei/debugfs.c
+++ b/drivers/misc/mei/debugfs.c
@@ -24,12 +24,6 @@
24#include "mei_dev.h" 24#include "mei_dev.h"
25#include "hw.h" 25#include "hw.h"
26 26
27static int mei_dbgfs_open(struct inode *inode, struct file *file)
28{
29 file->private_data = inode->i_private;
30 return 0;
31}
32
33static ssize_t mei_dbgfs_read_meclients(struct file *fp, char __user *ubuf, 27static ssize_t mei_dbgfs_read_meclients(struct file *fp, char __user *ubuf,
34 size_t cnt, loff_t *ppos) 28 size_t cnt, loff_t *ppos)
35{ 29{
@@ -76,7 +70,7 @@ out:
76} 70}
77 71
78static const struct file_operations mei_dbgfs_fops_meclients = { 72static const struct file_operations mei_dbgfs_fops_meclients = {
79 .open = mei_dbgfs_open, 73 .open = simple_open,
80 .read = mei_dbgfs_read_meclients, 74 .read = mei_dbgfs_read_meclients,
81 .llseek = generic_file_llseek, 75 .llseek = generic_file_llseek,
82}; 76};
@@ -100,7 +94,7 @@ static ssize_t mei_dbgfs_read_devstate(struct file *fp, char __user *ubuf,
100 return ret; 94 return ret;
101} 95}
102static const struct file_operations mei_dbgfs_fops_devstate = { 96static const struct file_operations mei_dbgfs_fops_devstate = {
103 .open = mei_dbgfs_open, 97 .open = simple_open,
104 .read = mei_dbgfs_read_devstate, 98 .read = mei_dbgfs_read_devstate,
105 .llseek = generic_file_llseek, 99 .llseek = generic_file_llseek,
106}; 100};