diff mbox

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

Message ID 1480698974-9093-2-git-send-email-sean@mess.org (mailing list archive)
State New, archived
Headers show

Commit Message

Sean Young Dec. 2, 2016, 5:16 p.m. UTC
Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these
ioctls no longer work.

Signed-off-by: Sean Young <sean@mess.org>
Cc: Andi Shyti <andi.shyti@samsung.com>
Cc: <stable@vger.kernel.org> # v4.8+
---
 drivers/media/rc/lirc_dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andi Shyti Dec. 7, 2016, 1:48 a.m. UTC | #1
> Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these
> ioctls no longer work.
> 
> Signed-off-by: Sean Young <sean@mess.org>
> Cc: Andi Shyti <andi.shyti@samsung.com>
> Cc: <stable@vger.kernel.org> # v4.8+

mmhhh... yes, right! :)

Reviewed-by: Andi Shyti <andi.shyti@samsung.com>

Thanks,
Andi

> ---
>  drivers/media/rc/lirc_dev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
> index 3854809..7f5d109 100644
> --- a/drivers/media/rc/lirc_dev.c
> +++ b/drivers/media/rc/lirc_dev.c
> @@ -582,7 +582,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;
>  		}
> @@ -592,7 +592,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;
>  		}
> -- 
> 2.9.3
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 3854809..7f5d109 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -582,7 +582,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;
 		}
@@ -592,7 +592,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;
 		}