Skip to content

Commit

Permalink
V4L/DVB: re-add enable/disable check to the IR decoders
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed May 19, 2010
1 parent 9dfe4e8 commit 7f20d32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/IR/ir-nec-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ static int ir_nec_decode(struct input_dev *input_dev,
if (!data)
return -EINVAL;

if (!data->enabled)
return 0;

/* Except for the initial event, what matters is the previous bit */
bit = (ev->type & IR_PULSE) ? 1 : 0;

Expand Down
3 changes: 3 additions & 0 deletions drivers/media/IR/ir-rc5-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ static int ir_rc5_decode(struct input_dev *input_dev,
if (!data)
return -EINVAL;

if (!data->enabled)
return 0;

/* Except for the initial event, what matters is the previous bit */
bit = (ev->type & IR_PULSE) ? 1 : 0;

Expand Down

0 comments on commit 7f20d32

Please sign in to comment.