aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/lirc_dev.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-09-26 07:31:29 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-14 10:35:18 -0500
commit7790e81f7e1f7f122f8fcccd91443a2571421aba (patch)
tree168eb07f96e9204c3b2a11b0e5cbfb98c083af54 /drivers/media/rc/lirc_dev.c
parentmedia: lirc: use kfifo rather than lirc_buffer for raw IR (diff)
downloadlinux-dev-7790e81f7e1f7f122f8fcccd91443a2571421aba.tar.xz
linux-dev-7790e81f7e1f7f122f8fcccd91443a2571421aba.zip
media: lirc: move lirc_dev->attached to rc_dev->registered
This is done to further remove the lirc kernel api. Ensure that every fops checks for this. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/lirc_dev.c')
-rw-r--r--drivers/media/rc/lirc_dev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 9a0ad8d9a0cb..22171267aa90 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -122,7 +122,6 @@ int lirc_register_device(struct lirc_dev *d)
cdev_init(&d->cdev, d->fops);
d->cdev.owner = d->owner;
- d->attached = true;
err = cdev_device_add(&d->cdev, &d->dev);
if (err) {
@@ -153,7 +152,6 @@ void lirc_unregister_device(struct lirc_dev *d)
mutex_lock(&d->mutex);
- d->attached = false;
if (d->open) {
dev_dbg(&d->dev, LOGHEAD "releasing opened driver\n",
d->name, d->minor);
@@ -180,7 +178,7 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
if (retval)
return retval;
- if (!d->attached) {
+ if (!rcdev->registered) {
retval = -ENODEV;
goto out;
}