diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2015-11-16 20:52:50 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-11-19 14:39:17 +0100 |
commit | d80ca8bd71f0b01b2b12459189927cb3299cfab9 (patch) | |
tree | 693561395d207df695e99b546cef8fd84107cd21 /drivers/media/rc/rc-ir-raw.c | |
parent | [media] media: rc: load decoder modules on-demand (diff) | |
download | linux-d80ca8bd71f0b01b2b12459189927cb3299cfab9.tar.xz linux-d80ca8bd71f0b01b2b12459189927cb3299cfab9.zip |
[media] media: rc: move check whether a protocol is enabled to the core
Checking whether a protocol is enabled and calling the related decoder
functions should be done by the rc core, not the protocol handlers.
Properly handle lirc considering that no protocol bit is set for lirc.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/rc/rc-ir-raw.c')
-rw-r--r-- | drivers/media/rc/rc-ir-raw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c index 763f8a87e344..c6433e8f03b8 100644 --- a/drivers/media/rc/rc-ir-raw.c +++ b/drivers/media/rc/rc-ir-raw.c @@ -59,7 +59,9 @@ static int ir_raw_event_thread(void *data) mutex_lock(&ir_raw_handler_lock); list_for_each_entry(handler, &ir_raw_handler_list, list) - handler->decode(raw->dev, ev); + if (raw->dev->enabled_protocols & handler->protocols || + !handler->protocols) + handler->decode(raw->dev, ev); raw->prev_ev = ev; mutex_unlock(&ir_raw_handler_lock); } |