mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: [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>
(cherry picked from commit 3bce557236)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
committed by
Tao Huang
parent
e883d1aca1
commit
6fe87b34ae
@@ -41,7 +41,7 @@ static dev_t lirc_base_dev;
|
||||
|
||||
struct irctl {
|
||||
struct lirc_driver d;
|
||||
int attached;
|
||||
bool attached;
|
||||
int open;
|
||||
|
||||
struct mutex irctl_lock;
|
||||
@@ -199,7 +199,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)
|
||||
@@ -237,7 +237,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);
|
||||
|
||||
Reference in New Issue
Block a user