summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-08-15 18:51:56 +0200
committerArnd Bergmann <arnd@arndb.de>2010-09-16 10:33:16 +0200
commitd9d2e9d5c9eead1f73f92f5fc03424dab90b6c95 (patch)
tree9e315c7eabb32658d7b03ec3454fb075bfba9c4c /drivers/media
parentaadbd4360911d7166dc04c5a4e5520b2c7914c73 (diff)
downloadop-kernel-dev-d9d2e9d5c9eead1f73f92f5fc03424dab90b6c95.zip
op-kernel-dev-d9d2e9d5c9eead1f73f92f5fc03424dab90b6c95.tar.gz
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/media')
-rw-r--r--drivers/media/IR/ir-lirc-codec.c1
-rw-r--r--drivers/media/IR/lirc_dev.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/IR/ir-lirc-codec.c b/drivers/media/IR/ir-lirc-codec.c
index 77b5946..8a12893 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 = {
.poll = lirc_dev_fop_poll,
.open = lirc_dev_fop_open,
.release = lirc_dev_fop_close,
+ .llseek = no_llseek,
};
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 899891b..5b145e8 100644
--- a/drivers/media/IR/lirc_dev.c
+++ b/drivers/media/IR/lirc_dev.c
@@ -460,6 +460,8 @@ error:
mutex_unlock(&lirc_dev_lock);
+ nonseekable_open(inode, file);
+
return retval;
}
EXPORT_SYMBOL(lirc_dev_fop_open);
OpenPOWER on IntegriCloud