summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2017-06-25 09:31:55 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2017-10-04 13:57:45 -0300
commit3bce5572364899970cbe908d98c51d1bc743b2f8 (patch)
tree86a0905c4abb9f5dc15539ab1162b44a6948a321 /drivers/media
parentb145ef94f63e02c2615ffde61a376b53f3367bc6 (diff)
downloadlinux-3bce5572364899970cbe908d98c51d1bc743b2f8.tar.bz2
[media] media: lirc_dev: change irctl->attached to be a boolean
The "attached" member of struct irctl is a boolean value, so let the code reflect that. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/rc/lirc_dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 1915ffc52955..b07d0ab37d6b 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -35,7 +35,7 @@ static dev_t lirc_base_dev;
struct irctl {
struct lirc_driver d;
- int attached;
+ bool attached;
int open;
struct mutex irctl_lock;
@@ -193,7 +193,7 @@ int lirc_register_driver(struct lirc_driver *d)
cdev_init(&ir->cdev, d->fops);
ir->cdev.owner = ir->d.owner;
- ir->attached = 1;
+ ir->attached = true;
err = cdev_device_add(&ir->cdev, &ir->dev);
if (err)
@@ -231,7 +231,7 @@ void lirc_unregister_driver(struct lirc_driver *d)
dev_dbg(ir->d.dev, "lirc_dev: driver %s unregistered from minor = %d\n",
d->name, d->minor);
- ir->attached = 0;
+ ir->attached = false;
if (ir->open) {
dev_dbg(ir->d.dev, LOGHEAD "releasing opened driver\n",
d->name, d->minor);