summaryrefslogtreecommitdiffstats
path: root/drivers/media/IR/ir-rc5-decoder.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-04 19:45:04 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 17:56:59 +0200
commit7f20d32d446097789ade5ada6b645742ddac4ece (patch)
treed4e63857434911ed347bc51e0a44f8fb4916c8fb /drivers/media/IR/ir-rc5-decoder.c
parentV4L/DVB: ir-core: Add support for badly-implemented hardware decoders (diff)
downloadlinux-7f20d32d446097789ade5ada6b645742ddac4ece.tar.xz
linux-7f20d32d446097789ade5ada6b645742ddac4ece.zip
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>
Diffstat (limited to '')
-rw-r--r--drivers/media/IR/ir-rc5-decoder.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/IR/ir-rc5-decoder.c b/drivers/media/IR/ir-rc5-decoder.c
index 61b58397a3c2..4fb3ce410e24 100644
--- a/drivers/media/IR/ir-rc5-decoder.c
+++ b/drivers/media/IR/ir-rc5-decoder.c
@@ -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;