mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 08:13:56 -04:00
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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
71695aff9f
commit
7790e81f7e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user