diff options
author | Sean Young <sean@mess.org> | 2017-01-19 19:27:17 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-31 07:28:18 -0200 |
commit | c9bbd5661fa85e086ee52aa5905b62d14ee8b7a3 (patch) | |
tree | 43e702945478f50d96d6762dc7182b26f2a29547 | |
parent | 126f6846cb184d21d2f86e50d0b6459e94cf9428 (diff) | |
download | op-kernel-dev-c9bbd5661fa85e086ee52aa5905b62d14ee8b7a3.zip op-kernel-dev-c9bbd5661fa85e086ee52aa5905b62d14ee8b7a3.tar.gz |
[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: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/rc/ir-lirc-codec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 9e41305..e944507 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c @@ -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) |