diff options
author | Andi Shyti <andi.shyti@samsung.com> | 2016-07-06 12:01:27 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-13 21:29:03 +0300 |
commit | 273b902a5b1bfd6977a73c4de3eb96db3cb103cb (patch) | |
tree | 7d15ef7d71169c3f1867bbce000a759e7b208a96 /drivers/media/rc/lirc_dev.c | |
parent | 8e5fa4c67d6387d40e2ae350e96fca939ba5e681 (diff) | |
download | linux-273b902a5b1bfd6977a73c4de3eb96db3cb103cb.tar.xz |
[media] lirc_dev: use LIRC_CAN_REC() define to check if the device can receive
The LIRC_CAN_REC() returns a boolean "flag & LIRC_CAN_REC_MASK"
to check whether the device can receive data.
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/lirc_dev.c')
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index a107ab6bcb88..91f9bb87ce68 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -589,7 +589,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 (!(ir->d.features & LIRC_CAN_REC_MASK)) { + if (LIRC_CAN_REC(ir->d.features)) { result = -ENOTTY; break; } @@ -599,7 +599,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 (!(ir->d.features & LIRC_CAN_REC_MASK)) { + if (LIRC_CAN_REC(ir->d.features)) { result = -ENOTTY; break; } |