diff options
Diffstat (limited to 'drivers/base/regmap/regmap-debugfs.c')
-rw-r--r-- | drivers/base/regmap/regmap-debugfs.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 58517a5dac13..251eb70f83e7 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c | |||
@@ -27,12 +27,6 @@ static size_t regmap_calc_reg_len(int max_val, char *buf, size_t buf_size) | |||
27 | return strlen(buf); | 27 | return strlen(buf); |
28 | } | 28 | } |
29 | 29 | ||
30 | static int regmap_open_file(struct inode *inode, struct file *file) | ||
31 | { | ||
32 | file->private_data = inode->i_private; | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static ssize_t regmap_name_read_file(struct file *file, | 30 | static ssize_t regmap_name_read_file(struct file *file, |
37 | char __user *user_buf, size_t count, | 31 | char __user *user_buf, size_t count, |
38 | loff_t *ppos) | 32 | loff_t *ppos) |
@@ -57,7 +51,7 @@ static ssize_t regmap_name_read_file(struct file *file, | |||
57 | } | 51 | } |
58 | 52 | ||
59 | static const struct file_operations regmap_name_fops = { | 53 | static const struct file_operations regmap_name_fops = { |
60 | .open = regmap_open_file, | 54 | .open = simple_open, |
61 | .read = regmap_name_read_file, | 55 | .read = regmap_name_read_file, |
62 | .llseek = default_llseek, | 56 | .llseek = default_llseek, |
63 | }; | 57 | }; |
@@ -174,7 +168,7 @@ static ssize_t regmap_map_write_file(struct file *file, | |||
174 | #endif | 168 | #endif |
175 | 169 | ||
176 | static const struct file_operations regmap_map_fops = { | 170 | static const struct file_operations regmap_map_fops = { |
177 | .open = regmap_open_file, | 171 | .open = simple_open, |
178 | .read = regmap_map_read_file, | 172 | .read = regmap_map_read_file, |
179 | .write = regmap_map_write_file, | 173 | .write = regmap_map_write_file, |
180 | .llseek = default_llseek, | 174 | .llseek = default_llseek, |
@@ -243,7 +237,7 @@ out: | |||
243 | } | 237 | } |
244 | 238 | ||
245 | static const struct file_operations regmap_access_fops = { | 239 | static const struct file_operations regmap_access_fops = { |
246 | .open = regmap_open_file, | 240 | .open = simple_open, |
247 | .read = regmap_access_read_file, | 241 | .read = regmap_access_read_file, |
248 | .llseek = default_llseek, | 242 | .llseek = default_llseek, |
249 | }; | 243 | }; |