diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-08-15 12:51:56 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-09-16 04:33:16 -0400 |
commit | d9d2e9d5c9eead1f73f92f5fc03424dab90b6c95 (patch) | |
tree | 9e315c7eabb32658d7b03ec3454fb075bfba9c4c /drivers | |
parent | aadbd4360911d7166dc04c5a4e5520b2c7914c73 (diff) |
lirc: make chardev nonseekable
There does not seem to be a need for lirc to
allow seeking on the file descriptor, so let's
just disallow this before users start relying
on it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/IR/ir-lirc-codec.c | 1 | ||||
-rw-r--r-- | drivers/media/IR/lirc_dev.c | 2 | ||||
-rw-r--r-- | drivers/staging/lirc/lirc_serial.c | 1 | ||||
-rw-r--r-- | drivers/staging/lirc/lirc_sir.c | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/IR/ir-lirc-codec.c b/drivers/media/IR/ir-lirc-codec.c index 77b5946413c0..8a128934e605 100644 --- a/drivers/media/IR/ir-lirc-codec.c +++ b/drivers/media/IR/ir-lirc-codec.c | |||
@@ -235,6 +235,7 @@ static struct file_operations lirc_fops = { | |||
235 | .poll = lirc_dev_fop_poll, | 235 | .poll = lirc_dev_fop_poll, |
236 | .open = lirc_dev_fop_open, | 236 | .open = lirc_dev_fop_open, |
237 | .release = lirc_dev_fop_close, | 237 | .release = lirc_dev_fop_close, |
238 | .llseek = no_llseek, | ||
238 | }; | 239 | }; |
239 | 240 | ||
240 | static int ir_lirc_register(struct input_dev *input_dev) | 241 | static int ir_lirc_register(struct input_dev *input_dev) |
diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c index 899891bec352..5b145e8672fe 100644 --- a/drivers/media/IR/lirc_dev.c +++ b/drivers/media/IR/lirc_dev.c | |||
@@ -460,6 +460,8 @@ error: | |||
460 | 460 | ||
461 | mutex_unlock(&lirc_dev_lock); | 461 | mutex_unlock(&lirc_dev_lock); |
462 | 462 | ||
463 | nonseekable_open(inode, file); | ||
464 | |||
463 | return retval; | 465 | return retval; |
464 | } | 466 | } |
465 | EXPORT_SYMBOL(lirc_dev_fop_open); | 467 | EXPORT_SYMBOL(lirc_dev_fop_open); |
diff --git a/drivers/staging/lirc/lirc_serial.c b/drivers/staging/lirc/lirc_serial.c index 9456f8e3f9ef..8da382492612 100644 --- a/drivers/staging/lirc/lirc_serial.c +++ b/drivers/staging/lirc/lirc_serial.c | |||
@@ -1058,6 +1058,7 @@ static const struct file_operations lirc_fops = { | |||
1058 | .poll = lirc_dev_fop_poll, | 1058 | .poll = lirc_dev_fop_poll, |
1059 | .open = lirc_dev_fop_open, | 1059 | .open = lirc_dev_fop_open, |
1060 | .release = lirc_dev_fop_close, | 1060 | .release = lirc_dev_fop_close, |
1061 | .llseek = no_llseek, | ||
1061 | }; | 1062 | }; |
1062 | 1063 | ||
1063 | static struct lirc_driver driver = { | 1064 | static struct lirc_driver driver = { |
diff --git a/drivers/staging/lirc/lirc_sir.c b/drivers/staging/lirc/lirc_sir.c index eb08fa7138ba..2478871bd95e 100644 --- a/drivers/staging/lirc/lirc_sir.c +++ b/drivers/staging/lirc/lirc_sir.c | |||
@@ -459,6 +459,7 @@ static const struct file_operations lirc_fops = { | |||
459 | .unlocked_ioctl = lirc_ioctl, | 459 | .unlocked_ioctl = lirc_ioctl, |
460 | .open = lirc_dev_fop_open, | 460 | .open = lirc_dev_fop_open, |
461 | .release = lirc_dev_fop_close, | 461 | .release = lirc_dev_fop_close, |
462 | .llseek = no_llseek, | ||
462 | }; | 463 | }; |
463 | 464 | ||
464 | static int set_use_inc(void *data) | 465 | static int set_use_inc(void *data) |