Skip to content
Snippets Groups Projects
Commit d9d2e9d5 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
parent aadbd436
No related branches found
No related tags found
No related merge requests found
...@@ -235,6 +235,7 @@ static struct file_operations lirc_fops = { ...@@ -235,6 +235,7 @@ static struct file_operations lirc_fops = {
.poll = lirc_dev_fop_poll, .poll = lirc_dev_fop_poll,
.open = lirc_dev_fop_open, .open = lirc_dev_fop_open,
.release = lirc_dev_fop_close, .release = lirc_dev_fop_close,
.llseek = no_llseek,
}; };
static int ir_lirc_register(struct input_dev *input_dev) static int ir_lirc_register(struct input_dev *input_dev)
......
...@@ -460,6 +460,8 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file) ...@@ -460,6 +460,8 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
mutex_unlock(&lirc_dev_lock); mutex_unlock(&lirc_dev_lock);
nonseekable_open(inode, file);
return retval; return retval;
} }
EXPORT_SYMBOL(lirc_dev_fop_open); EXPORT_SYMBOL(lirc_dev_fop_open);
......
...@@ -1058,6 +1058,7 @@ static const struct file_operations lirc_fops = { ...@@ -1058,6 +1058,7 @@ static const struct file_operations lirc_fops = {
.poll = lirc_dev_fop_poll, .poll = lirc_dev_fop_poll,
.open = lirc_dev_fop_open, .open = lirc_dev_fop_open,
.release = lirc_dev_fop_close, .release = lirc_dev_fop_close,
.llseek = no_llseek,
}; };
static struct lirc_driver driver = { static struct lirc_driver driver = {
......
...@@ -459,6 +459,7 @@ static const struct file_operations lirc_fops = { ...@@ -459,6 +459,7 @@ static const struct file_operations lirc_fops = {
.unlocked_ioctl = lirc_ioctl, .unlocked_ioctl = lirc_ioctl,
.open = lirc_dev_fop_open, .open = lirc_dev_fop_open,
.release = lirc_dev_fop_close, .release = lirc_dev_fop_close,
.llseek = no_llseek,
}; };
static int set_use_inc(void *data) static int set_use_inc(void *data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment