Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d889a135 authored by Jarod Wilson's avatar Jarod Wilson Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarJarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 90dc4cfa
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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__);