[media] lirc_dev: LIRC_{G,S}ET_REC_MODE do not work

Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these
ioctls no longer work.

Signed-off-by: Sean Young <sean@mess.org>
Cc: <stable@vger.kernel.org> # v4.8+
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Sean Young 2016-12-02 15:16:08 -02:00 committed by Mauro Carvalho Chehab
parent 3cf8d8e4fc
commit bd291208d7

View file

@ -578,7 +578,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
result = put_user(ir->d.features, (__u32 __user *)arg);
break;
case LIRC_GET_REC_MODE:
if (LIRC_CAN_REC(ir->d.features)) {
if (!LIRC_CAN_REC(ir->d.features)) {
result = -ENOTTY;
break;
}
@ -588,7 +588,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
(__u32 __user *)arg);
break;
case LIRC_SET_REC_MODE:
if (LIRC_CAN_REC(ir->d.features)) {
if (!LIRC_CAN_REC(ir->d.features)) {
result = -ENOTTY;
break;
}