V4L/DVB: re-add enable/disable check to the IR decoders
A previous cleanup patch removed more than needed. Re-add the logic that disable the decoders. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
@@ -142,6 +142,9 @@ static int ir_nec_decode(struct input_dev *input_dev,
|
|||||||
if (!data)
|
if (!data)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (!data->enabled)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Except for the initial event, what matters is the previous bit */
|
/* Except for the initial event, what matters is the previous bit */
|
||||||
bit = (ev->type & IR_PULSE) ? 1 : 0;
|
bit = (ev->type & IR_PULSE) ? 1 : 0;
|
||||||
|
|
||||||
|
@@ -153,6 +153,9 @@ static int ir_rc5_decode(struct input_dev *input_dev,
|
|||||||
if (!data)
|
if (!data)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (!data->enabled)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Except for the initial event, what matters is the previous bit */
|
/* Except for the initial event, what matters is the previous bit */
|
||||||
bit = (ev->type & IR_PULSE) ? 1 : 0;
|
bit = (ev->type & IR_PULSE) ? 1 : 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user