aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-18 02:34:08 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-11-22 04:39:31 -0500
commit21cc57fbdc698cd89955dd92be81776af6456dd7 (patch)
treef4ce59550cccc2cac79d5b92803779ff31c7a6e3
parent8ad88e3711d326b1441d4c198928302b13e06fc5 (diff)
ixgbe: 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. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
index 8d3a21889099..efaf9a73cc79 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
@@ -37,20 +37,6 @@ static struct dentry *ixgbe_dbg_root;
37static char ixgbe_dbg_reg_ops_buf[256] = ""; 37static char ixgbe_dbg_reg_ops_buf[256] = "";
38 38
39/** 39/**
40 * ixgbe_dbg_reg_ops_open - prep the debugfs pokee data item when opened
41 * @inode: inode that was opened
42 * @filp: file info
43 *
44 * Stash the adapter pointer hiding in the inode into the file pointer where
45 * we can find it later in the read and write calls
46 **/
47static int ixgbe_dbg_reg_ops_open(struct inode *inode, struct file *filp)
48{
49 filp->private_data = inode->i_private;
50 return 0;
51}
52
53/**
54 * ixgbe_dbg_reg_ops_read - read for reg_ops datum 40 * ixgbe_dbg_reg_ops_read - read for reg_ops datum
55 * @filp: the opened file 41 * @filp: the opened file
56 * @buffer: where to write the data for the user to read 42 * @buffer: where to write the data for the user to read
@@ -142,7 +128,7 @@ static ssize_t ixgbe_dbg_reg_ops_write(struct file *filp,
142 128
143static const struct file_operations ixgbe_dbg_reg_ops_fops = { 129static const struct file_operations ixgbe_dbg_reg_ops_fops = {
144 .owner = THIS_MODULE, 130 .owner = THIS_MODULE,
145 .open = ixgbe_dbg_reg_ops_open, 131 .open = simple_open,
146 .read = ixgbe_dbg_reg_ops_read, 132 .read = ixgbe_dbg_reg_ops_read,
147 .write = ixgbe_dbg_reg_ops_write, 133 .write = ixgbe_dbg_reg_ops_write,
148}; 134};
@@ -150,20 +136,6 @@ static const struct file_operations ixgbe_dbg_reg_ops_fops = {
150static char ixgbe_dbg_netdev_ops_buf[256] = ""; 136static char ixgbe_dbg_netdev_ops_buf[256] = "";
151 137
152/** 138/**
153 * ixgbe_dbg_netdev_ops_open - prep the debugfs netdev_ops data item
154 * @inode: inode that was opened
155 * @filp: file info
156 *
157 * Stash the adapter pointer hiding in the inode into the file pointer
158 * where we can find it later in the read and write calls
159 **/
160static int ixgbe_dbg_netdev_ops_open(struct inode *inode, struct file *filp)
161{
162 filp->private_data = inode->i_private;
163 return 0;
164}
165
166/**
167 * ixgbe_dbg_netdev_ops_read - read for netdev_ops datum 139 * ixgbe_dbg_netdev_ops_read - read for netdev_ops datum
168 * @filp: the opened file 140 * @filp: the opened file
169 * @buffer: where to write the data for the user to read 141 * @buffer: where to write the data for the user to read
@@ -238,7 +210,7 @@ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp,
238 210
239static const struct file_operations ixgbe_dbg_netdev_ops_fops = { 211static const struct file_operations ixgbe_dbg_netdev_ops_fops = {
240 .owner = THIS_MODULE, 212 .owner = THIS_MODULE,
241 .open = ixgbe_dbg_netdev_ops_open, 213 .open = simple_open,
242 .read = ixgbe_dbg_netdev_ops_read, 214 .read = ixgbe_dbg_netdev_ops_read,
243 .write = ixgbe_dbg_netdev_ops_write, 215 .write = ixgbe_dbg_netdev_ops_write,
244}; 216};