diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-12-21 19:21:47 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 13:10:33 -0500 |
commit | e0572325d23b8c89930a08e0b8b3850a6fe75d7d (patch) | |
tree | 7e70a405d62e7c8f29969d5ce300bca5ee763f04 /drivers/media | |
parent | 9c6f97a02358c78ed1db69cde702db263bc62cf6 (diff) |
V4L/DVB (13946): proc_fops: convert av7110
Drop S_IRUGO, proc entry doesn't contain read hooks.
Drop S_IFREG, simply unnecessary.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_ir.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/media/dvb/ttpci/av7110_ir.c b/drivers/media/dvb/ttpci/av7110_ir.c index 23a1c6380d3f..b070e88d8c6b 100644 --- a/drivers/media/dvb/ttpci/av7110_ir.c +++ b/drivers/media/dvb/ttpci/av7110_ir.c | |||
@@ -268,8 +268,8 @@ int av7110_check_ir_config(struct av7110 *av7110, int force) | |||
268 | 268 | ||
269 | 269 | ||
270 | /* /proc/av7110_ir interface */ | 270 | /* /proc/av7110_ir interface */ |
271 | static int av7110_ir_write_proc(struct file *file, const char __user *buffer, | 271 | static ssize_t av7110_ir_proc_write(struct file *file, const char __user *buffer, |
272 | unsigned long count, void *data) | 272 | size_t count, loff_t *pos) |
273 | { | 273 | { |
274 | char *page; | 274 | char *page; |
275 | u32 ir_config; | 275 | u32 ir_config; |
@@ -309,6 +309,10 @@ static int av7110_ir_write_proc(struct file *file, const char __user *buffer, | |||
309 | return count; | 309 | return count; |
310 | } | 310 | } |
311 | 311 | ||
312 | static const struct file_operations av7110_ir_proc_fops = { | ||
313 | .owner = THIS_MODULE, | ||
314 | .write = av7110_ir_proc_write, | ||
315 | }; | ||
312 | 316 | ||
313 | /* interrupt handler */ | 317 | /* interrupt handler */ |
314 | static void ir_handler(struct av7110 *av7110, u32 ircom) | 318 | static void ir_handler(struct av7110 *av7110, u32 ircom) |
@@ -368,11 +372,9 @@ int __devinit av7110_ir_init(struct av7110 *av7110) | |||
368 | input_dev->timer.data = (unsigned long) &av7110->ir; | 372 | input_dev->timer.data = (unsigned long) &av7110->ir; |
369 | 373 | ||
370 | if (av_cnt == 1) { | 374 | if (av_cnt == 1) { |
371 | e = create_proc_entry("av7110_ir", S_IFREG | S_IRUGO | S_IWUSR, NULL); | 375 | e = proc_create("av7110_ir", S_IWUSR, NULL, &av7110_ir_proc_fops); |
372 | if (e) { | 376 | if (e) |
373 | e->write_proc = av7110_ir_write_proc; | ||
374 | e->size = 4 + 256 * sizeof(u16); | 377 | e->size = 4 + 256 * sizeof(u16); |
375 | } | ||
376 | } | 378 | } |
377 | 379 | ||
378 | tasklet_init(&av7110->ir.ir_tasklet, av7110_emit_key, (unsigned long) &av7110->ir); | 380 | tasklet_init(&av7110->ir.ir_tasklet, av7110_emit_key, (unsigned long) &av7110->ir); |