From: Sean Young <sean@mess.org>
To: Matthias Reichl <hias@horus.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
linux-media@vger.kernel.org, <stable@kernel.org>
Subject: [PATCH] [media] rc: raw decoder for keymap protocol is not loaded on register
Date: Wed, 22 Feb 2017 23:11:49 +0000 [thread overview]
Message-ID: <1487805109-17432-1-git-send-email-sean@mess.org> (raw)
In-Reply-To: <20170222230052.GA17047@gofer.mess.org>
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>
Cc: <stable@kernel.org> # v4.5+
---
drivers/media/rc/rc-main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 2424946..a158b32 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1663,6 +1663,7 @@ static int rc_setup_rx_device(struct rc_dev *dev)
{
int rc;
struct rc_map *rc_map;
+ u64 rc_type;
if (!dev->map_name)
return -EINVAL;
@@ -1677,15 +1678,18 @@ static int rc_setup_rx_device(struct rc_dev *dev)
if (rc)
return rc;
- if (dev->change_protocol) {
- u64 rc_type = (1ll << rc_map->rc_type);
+ rc_type = BIT_ULL(rc_map->rc_type);
+ if (dev->change_protocol) {
rc = dev->change_protocol(dev, &rc_type);
if (rc < 0)
goto out_table;
dev->enabled_protocols = rc_type;
}
+ if (dev->driver_type == RC_DRIVER_IR_RAW)
+ ir_raw_load_modules(&rc_type);
+
set_bit(EV_KEY, dev->input_dev->evbit);
set_bit(EV_REP, dev->input_dev->evbit);
set_bit(EV_MSC, dev->input_dev->evbit);
--
2.9.3
next prev parent reply other threads:[~2017-02-22 23:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 18:49 Bug: decoders referenced in kernel rc-keymaps not loaded on boot Matthias Reichl
2017-02-21 19:34 ` Sean Young
2017-02-21 22:52 ` Matthias Reichl
2017-02-22 23:00 ` Sean Young
2017-02-22 23:11 ` Sean Young [this message]
2017-02-23 19:00 ` [PATCH] [media] rc: raw decoder for keymap protocol is not loaded on register Matthias Reichl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487805109-17432-1-git-send-email-sean@mess.org \
--to=sean@mess.org \
--cc=hias@horus.com \
--cc=hkallweit1@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox