diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-08-02 20:43:35 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 21:42:22 +0200 |
commit | 044e5878c2158d701e6f47a9604910589a384ee2 (patch) | |
tree | 9d06e2660ad15575a5df2c1e3bacfa68738ea55e /drivers/media/IR/lirc_dev.c | |
parent | V4L/DVB: IR: jvc-decoder needs BITREVERSE (diff) | |
download | linux-044e5878c2158d701e6f47a9604910589a384ee2.tar.xz linux-044e5878c2158d701e6f47a9604910589a384ee2.zip |
V4L/DVB: lirc: use unlocked_ioctl
New code should not rely on the big kernel lock,
so use the unlocked_ioctl file operation in lirc.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/lirc_dev.c')
-rw-r--r-- | drivers/media/IR/lirc_dev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c index 64170fa58006..c11b8f706258 100644 --- a/drivers/media/IR/lirc_dev.c +++ b/drivers/media/IR/lirc_dev.c @@ -160,7 +160,7 @@ static struct file_operations fops = { .read = lirc_dev_fop_read, .write = lirc_dev_fop_write, .poll = lirc_dev_fop_poll, - .ioctl = lirc_dev_fop_ioctl, + .unlocked_ioctl = lirc_dev_fop_ioctl, .open = lirc_dev_fop_open, .release = lirc_dev_fop_close, }; @@ -242,9 +242,9 @@ int lirc_register_driver(struct lirc_driver *d) goto out; } else if (!d->rbuf) { if (!(d->fops && d->fops->read && d->fops->poll && - d->fops->ioctl)) { + d->fops->unlocked_ioctl)) { dev_err(d->dev, "lirc_dev: lirc_register_driver: " - "neither read, poll nor ioctl can be NULL!\n"); + "neither read, poll nor unlocked_ioctl can be NULL!\n"); err = -EBADRQC; goto out; } @@ -425,6 +425,7 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file) retval = -ENODEV; goto error; } + file->private_data = ir; dev_dbg(ir->d.dev, LOGHEAD "open called\n", ir->d.name, ir->d.minor); @@ -516,12 +517,11 @@ unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait) } EXPORT_SYMBOL(lirc_dev_fop_poll); -int lirc_dev_fop_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { unsigned long mode; int result = 0; - struct irctl *ir = irctls[iminor(inode)]; + struct irctl *ir = file->private_data; dev_dbg(ir->d.dev, LOGHEAD "ioctl called (0x%x)\n", ir->d.name, ir->d.minor, cmd); |