aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-04 13:45:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:56:59 -0400
commit7f20d32d446097789ade5ada6b645742ddac4ece (patch)
treed4e63857434911ed347bc51e0a44f8fb4916c8fb
parent9dfe4e8339499bfe8e9a362fefc290b4cb9c3803 (diff)
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>
-rw-r--r--drivers/media/IR/ir-nec-decoder.c3
-rw-r--r--drivers/media/IR/ir-rc5-decoder.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c
index 28d773563556..9d1ada95aa72 100644
--- a/drivers/media/IR/ir-nec-decoder.c
+++ b/drivers/media/IR/ir-nec-decoder.c
@@ -142,6 +142,9 @@ static int ir_nec_decode(struct input_dev *input_dev,
142 if (!data) 142 if (!data)
143 return -EINVAL; 143 return -EINVAL;
144 144
145 if (!data->enabled)
146 return 0;
147
145 /* Except for the initial event, what matters is the previous bit */ 148 /* Except for the initial event, what matters is the previous bit */
146 bit = (ev->type & IR_PULSE) ? 1 : 0; 149 bit = (ev->type & IR_PULSE) ? 1 : 0;
147 150
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,
153 if (!data) 153 if (!data)
154 return -EINVAL; 154 return -EINVAL;
155 155
156 if (!data->enabled)
157 return 0;
158
156 /* Except for the initial event, what matters is the previous bit */ 159 /* Except for the initial event, what matters is the previous bit */
157 bit = (ev->type & IR_PULSE) ? 1 : 0; 160 bit = (ev->type & IR_PULSE) ? 1 : 0;
158 161