diff options
author | Geliang Tang <geliangtang@gmail.com> | 2017-01-30 11:39:49 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-01-30 11:39:49 -0500 |
commit | 0a9aae40a6762fb509bc6b6b8f08ac83ab428a11 (patch) | |
tree | 85d9d082384e0830f6f2b2ea49dc252edadff1f3 | |
parent | 74a2b96e61d78051c70c24ad4499e0c8dcd1a0f1 (diff) |
video/mbx: use simple_open()
Drop open_file_generic(), use simple_open() instead of it.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-rw-r--r-- | drivers/video/fbdev/mbx/mbxdebugfs.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/video/fbdev/mbx/mbxdebugfs.c b/drivers/video/fbdev/mbx/mbxdebugfs.c index e3bc00a75296..2528d3e609a4 100644 --- a/drivers/video/fbdev/mbx/mbxdebugfs.c +++ b/drivers/video/fbdev/mbx/mbxdebugfs.c | |||
@@ -15,12 +15,6 @@ struct mbxfb_debugfs_data { | |||
15 | struct dentry *misc; | 15 | struct dentry *misc; |
16 | }; | 16 | }; |
17 | 17 | ||
18 | static int open_file_generic(struct inode *inode, struct file *file) | ||
19 | { | ||
20 | file->private_data = inode->i_private; | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | static ssize_t write_file_dummy(struct file *file, const char __user *buf, | 18 | static ssize_t write_file_dummy(struct file *file, const char __user *buf, |
25 | size_t count, loff_t *ppos) | 19 | size_t count, loff_t *ppos) |
26 | { | 20 | { |
@@ -174,42 +168,42 @@ static ssize_t misc_read_file(struct file *file, char __user *userbuf, | |||
174 | static const struct file_operations sysconf_fops = { | 168 | static const struct file_operations sysconf_fops = { |
175 | .read = sysconf_read_file, | 169 | .read = sysconf_read_file, |
176 | .write = write_file_dummy, | 170 | .write = write_file_dummy, |
177 | .open = open_file_generic, | 171 | .open = simple_open, |
178 | .llseek = default_llseek, | 172 | .llseek = default_llseek, |
179 | }; | 173 | }; |
180 | 174 | ||
181 | static const struct file_operations clock_fops = { | 175 | static const struct file_operations clock_fops = { |
182 | .read = clock_read_file, | 176 | .read = clock_read_file, |
183 | .write = write_file_dummy, | 177 | .write = write_file_dummy, |
184 | .open = open_file_generic, | 178 | .open = simple_open, |
185 | .llseek = default_llseek, | 179 | .llseek = default_llseek, |
186 | }; | 180 | }; |
187 | 181 | ||
188 | static const struct file_operations display_fops = { | 182 | static const struct file_operations display_fops = { |
189 | .read = display_read_file, | 183 | .read = display_read_file, |
190 | .write = write_file_dummy, | 184 | .write = write_file_dummy, |
191 | .open = open_file_generic, | 185 | .open = simple_open, |
192 | .llseek = default_llseek, | 186 | .llseek = default_llseek, |
193 | }; | 187 | }; |
194 | 188 | ||
195 | static const struct file_operations gsctl_fops = { | 189 | static const struct file_operations gsctl_fops = { |
196 | .read = gsctl_read_file, | 190 | .read = gsctl_read_file, |
197 | .write = write_file_dummy, | 191 | .write = write_file_dummy, |
198 | .open = open_file_generic, | 192 | .open = simple_open, |
199 | .llseek = default_llseek, | 193 | .llseek = default_llseek, |
200 | }; | 194 | }; |
201 | 195 | ||
202 | static const struct file_operations sdram_fops = { | 196 | static const struct file_operations sdram_fops = { |
203 | .read = sdram_read_file, | 197 | .read = sdram_read_file, |
204 | .write = write_file_dummy, | 198 | .write = write_file_dummy, |
205 | .open = open_file_generic, | 199 | .open = simple_open, |
206 | .llseek = default_llseek, | 200 | .llseek = default_llseek, |
207 | }; | 201 | }; |
208 | 202 | ||
209 | static const struct file_operations misc_fops = { | 203 | static const struct file_operations misc_fops = { |
210 | .read = misc_read_file, | 204 | .read = misc_read_file, |
211 | .write = write_file_dummy, | 205 | .write = write_file_dummy, |
212 | .open = open_file_generic, | 206 | .open = simple_open, |
213 | .llseek = default_llseek, | 207 | .llseek = default_llseek, |
214 | }; | 208 | }; |
215 | 209 | ||