From: Mauro Carvalho Chehab Date: Sun, 4 Apr 2010 17:45:04 +0000 (-0300) Subject: V4L/DVB: re-add enable/disable check to the IR decoders X-Git-Tag: master-2010-06-02~111^2~229 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=7f20d32d446097789ade5ada6b645742ddac4ece;p=~andy%2Flinux 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 --- diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c index 28d77356355..9d1ada95aa7 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, 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; diff --git a/drivers/media/IR/ir-rc5-decoder.c b/drivers/media/IR/ir-rc5-decoder.c index 61b58397a3c..4fb3ce410e2 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;