Skip to content

Commit

Permalink
lirc: make chardev nonseekable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Bergmann committed Sep 16, 2010
1 parent aadbd43 commit d9d2e9d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/IR/ir-lirc-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/IR/lirc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)

mutex_unlock(&lirc_dev_lock);

nonseekable_open(inode, file);

return retval;
}
EXPORT_SYMBOL(lirc_dev_fop_open);
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/lirc/lirc_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ static const struct file_operations lirc_fops = {
.poll = lirc_dev_fop_poll,
.open = lirc_dev_fop_open,
.release = lirc_dev_fop_close,
.llseek = no_llseek,
};

static struct lirc_driver driver = {
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/lirc/lirc_sir.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ static const struct file_operations lirc_fops = {
.unlocked_ioctl = lirc_ioctl,
.open = lirc_dev_fop_open,
.release = lirc_dev_fop_close,
.llseek = no_llseek,
};

static int set_use_inc(void *data)
Expand Down

0 comments on commit d9d2e9d

Please sign in to comment.