mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
UPSTREAM: [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>
(cherry picked from commit 273b902a5b)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user