From 62d6f1994b41b9210b07ca453372797f59141e5c Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sun, 24 Sep 2017 12:43:24 -0400 Subject: media: lirc: scancode rc devices should have a lirc device too Now that the lirc interface supports scancodes, RC scancode devices can also have a lirc device. The only receiving feature they will have enabled is LIRC_CAN_REC_SCANCODE. Note that CEC devices have no lirc device, since they can be controlled from their /dev/cecN chardev. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/rc-main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/media/rc/rc-main.c') diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 058807bc80dc..5830cb2c5943 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -1814,7 +1814,7 @@ int rc_register_device(struct rc_dev *dev) } /* Ensure that the lirc kfifo is setup before we start the thread */ - if (dev->driver_type != RC_DRIVER_SCANCODE) { + if (dev->allowed_protocols != RC_PROTO_BIT_CEC) { rc = ir_lirc_register(dev); if (rc < 0) goto out_rx; @@ -1835,7 +1835,7 @@ int rc_register_device(struct rc_dev *dev) return 0; out_lirc: - if (dev->driver_type != RC_DRIVER_SCANCODE) + if (dev->allowed_protocols != RC_PROTO_BIT_CEC) ir_lirc_unregister(dev); out_rx: rc_free_rx_device(dev); @@ -1898,7 +1898,7 @@ void rc_unregister_device(struct rc_dev *dev) * lirc device should be freed with dev->registered = false, so * that userspace polling will get notified. */ - if (dev->driver_type != RC_DRIVER_SCANCODE) + if (dev->allowed_protocols != RC_PROTO_BIT_CEC) ir_lirc_unregister(dev); device_del(&dev->dev); -- cgit v1.2.3