summaryrefslogtreecommitdiffstats
path: root/drivers/media/IR
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-10-16 21:36:43 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-22 20:05:36 -0200
commitd889a135cb832c77b7f90a89b40090e4e9ba609b (patch)
tree3b11de68a05c50b3726b32882b962666e45f89ba /drivers/media/IR
parent90dc4cfa2076cdc4df4c2f5dd3cadeefd9557c2c (diff)
downloadop-kernel-dev-d889a135cb832c77b7f90a89b40090e4e9ba609b.zip
op-kernel-dev-d889a135cb832c77b7f90a89b40090e4e9ba609b.tar.gz
[media] lirc_dev: get irctl from irctls by inode again
Can't explain it (yet), but I've seen the 'get irctl via private_data' setup fail for a number of people (ioctl called before its filled in?), so lets go back to a variant of the old way, but one that still works with unlocked_ioctl. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR')
-rw-r--r--drivers/media/IR/lirc_dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c
index 19a16ce..3eea373 100644
--- a/drivers/media/IR/lirc_dev.c
+++ b/drivers/media/IR/lirc_dev.c
@@ -432,7 +432,6 @@ 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);
@@ -528,7 +527,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
__u32 mode;
int result = 0;
- struct irctl *ir = file->private_data;
+ struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)];
if (!ir) {
printk(KERN_ERR "lirc_dev: %s: no irctl found!\n", __func__);
OpenPOWER on IntegriCloud