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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these
> ioctls no longer work.
> 
> Signed-off-by: Sean Young <sean@xxxxxxxx>
> Cc: Andi Shyti <andi.shyti@xxxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx> # v4.8+

mmhhh... yes, right! :)

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

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux