Commit ba5295f8 authored by Wei Yongjun's avatar Wei Yongjun Committed by Johannes Berg

iwlwifi: 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>
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 9047e4ad
...@@ -69,12 +69,6 @@ struct iwl_dbgfs_mvm_ctx { ...@@ -69,12 +69,6 @@ struct iwl_dbgfs_mvm_ctx {
struct ieee80211_vif *vif; struct ieee80211_vif *vif;
}; };
static int iwl_dbgfs_open_file_generic(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
return 0;
}
static ssize_t iwl_dbgfs_tx_flush_write(struct file *file, static ssize_t iwl_dbgfs_tx_flush_write(struct file *file,
const char __user *user_buf, const char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
...@@ -309,7 +303,7 @@ static ssize_t iwl_dbgfs_power_down_d3_allow_write(struct file *file, ...@@ -309,7 +303,7 @@ static ssize_t iwl_dbgfs_power_down_d3_allow_write(struct file *file,
#define MVM_DEBUGFS_READ_FILE_OPS(name) \ #define MVM_DEBUGFS_READ_FILE_OPS(name) \
static const struct file_operations iwl_dbgfs_##name##_ops = { \ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.read = iwl_dbgfs_##name##_read, \ .read = iwl_dbgfs_##name##_read, \
.open = iwl_dbgfs_open_file_generic, \ .open = simple_open, \
.llseek = generic_file_llseek, \ .llseek = generic_file_llseek, \
} }
...@@ -317,14 +311,14 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \ ...@@ -317,14 +311,14 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \
static const struct file_operations iwl_dbgfs_##name##_ops = { \ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.write = iwl_dbgfs_##name##_write, \ .write = iwl_dbgfs_##name##_write, \
.read = iwl_dbgfs_##name##_read, \ .read = iwl_dbgfs_##name##_read, \
.open = iwl_dbgfs_open_file_generic, \ .open = simple_open, \
.llseek = generic_file_llseek, \ .llseek = generic_file_llseek, \
}; };
#define MVM_DEBUGFS_WRITE_FILE_OPS(name) \ #define MVM_DEBUGFS_WRITE_FILE_OPS(name) \
static const struct file_operations iwl_dbgfs_##name##_ops = { \ static const struct file_operations iwl_dbgfs_##name##_ops = { \
.write = iwl_dbgfs_##name##_write, \ .write = iwl_dbgfs_##name##_write, \
.open = iwl_dbgfs_open_file_generic, \ .open = simple_open, \
.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