diff options
author | Sean Young <sean@mess.org> | 2017-02-22 21:48:01 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-18 11:14:34 (GMT) |
commit | 39df5977fd410a8ebd7f736455531440327e9ff0 (patch) | |
tree | c6344ff10a38fe16c36fdb6170a968afcae22c3e /drivers/media/rc | |
parent | 21582cd0b64ca464084cb872b3d348065b0b54af (diff) | |
download | linux-39df5977fd410a8ebd7f736455531440327e9ff0.tar.xz |
rc: raw decoder for keymap protocol is not loaded on register
commit 413808685dd7c9b54bbc5af79da2eaddd0fc3cb2 upstream.
When the protocol is set via the sysfs protocols attribute, the
decoder is loaded. However, when it is not when a device is first
plugged in or registered.
Fixes: acc1c3c ("[media] media: rc: load decoder modules on-demand")
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r-- | drivers/media/rc/rc-main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index d9c1f2f..aba7735 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -1411,6 +1411,7 @@ int rc_register_device(struct rc_dev *dev) int attr = 0; int minor; int rc; + u64 rc_type; if (!dev || !dev->map_name) return -EINVAL; @@ -1496,14 +1497,18 @@ int rc_register_device(struct rc_dev *dev) goto out_input; } + rc_type = BIT_ULL(rc_map->rc_type); + if (dev->change_protocol) { - u64 rc_type = (1ll << rc_map->rc_type); rc = dev->change_protocol(dev, &rc_type); if (rc < 0) goto out_raw; dev->enabled_protocols = rc_type; } + if (dev->driver_type == RC_DRIVER_IR_RAW) + ir_raw_load_modules(&rc_type); + /* Allow the RC sysfs nodes to be accessible */ atomic_set(&dev->initialized, 1); |