summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/rc-ir-raw.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-02-25 06:51:31 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-14 10:35:16 -0500
commit0d39ab0b628b38acf83506d36e9ec969055698df (patch)
tree8268bf15dd458ed124532d15b5bfb457af28fead /drivers/media/rc/rc-ir-raw.c
parentcdfaa01c1cfeb828e6d3c0c5e4f54375fc3ccb95 (diff)
downloadlinux-0d39ab0b628b38acf83506d36e9ec969055698df.tar.bz2
media: rc: auto load encoder if necessary
When sending scancodes, load the encoder if we need it. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/rc-ir-raw.c')
-rw-r--r--drivers/media/rc/rc-ir-raw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index 208db8a5adff..78638d1b73cc 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -448,6 +448,8 @@ int ir_raw_encode_scancode(enum rc_proto protocol, u32 scancode,
int ret = -EINVAL;
u64 mask = 1ULL << protocol;
+ ir_raw_load_modules(&mask);
+
mutex_lock(&ir_raw_handler_lock);
list_for_each_entry(handler, &ir_raw_handler_list, list) {
if (handler->protocols & mask && handler->encode) {