Commit c9bbd566 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

[media] lirc: fix transmit-only read features

An RC device which is transmit-only shouldn't have the
LIRC_CAN_REC_MODE2 feature.
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 126f6846
......@@ -347,7 +347,7 @@ static int ir_lirc_register(struct rc_dev *dev)
struct lirc_driver *drv;
struct lirc_buffer *rbuf;
int rc = -ENOMEM;
unsigned long features;
unsigned long features = 0;
drv = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL);
if (!drv)
......@@ -361,7 +361,8 @@ static int ir_lirc_register(struct rc_dev *dev)
if (rc)
goto rbuf_init_failed;
features = LIRC_CAN_REC_MODE2;
if (dev->driver_type != RC_DRIVER_IR_RAW_TX)
features |= LIRC_CAN_REC_MODE2;
if (dev->tx_ir) {
features |= LIRC_CAN_SEND_PULSE;
if (dev->s_tx_mask)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment