aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/lirc_dev.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-09-24 12:43:24 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-14 10:35:22 -0500
commit62d6f1994b41b9210b07ca453372797f59141e5c (patch)
tree19e74a7c53757d9438817c2d061df306e458c048 /drivers/media/rc/lirc_dev.c
parent7d402db89b5b6d3ca5128937dc04653df8668978 (diff)
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 <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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index d766abcffeac..2a0c48698309 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -57,7 +57,10 @@ int ir_lirc_register(struct rc_dev *dev)
57 dev->lirc_dev.release = lirc_release_device; 57 dev->lirc_dev.release = lirc_release_device;
58 dev->send_mode = LIRC_MODE_PULSE; 58 dev->send_mode = LIRC_MODE_PULSE;
59 59
60 dev->rec_mode = LIRC_MODE_MODE2; 60 if (dev->driver_type == RC_DRIVER_SCANCODE)
61 dev->rec_mode = LIRC_MODE_SCANCODE;
62 else
63 dev->rec_mode = LIRC_MODE_MODE2;
61 64
62 if (dev->driver_type == RC_DRIVER_IR_RAW) { 65 if (dev->driver_type == RC_DRIVER_IR_RAW) {
63 if (kfifo_alloc(&dev->rawir, MAX_IR_EVENT_SIZE, GFP_KERNEL)) 66 if (kfifo_alloc(&dev->rawir, MAX_IR_EVENT_SIZE, GFP_KERNEL))