From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gofer.mess.org ([80.229.237.210]:49143 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbdCOSeC (ORCPT ); Wed, 15 Mar 2017 14:34:02 -0400 Date: Wed, 15 Mar 2017 18:33:59 +0000 From: Sean Young To: gregkh@linuxfoundation.org Cc: mchehab@s-opensource.com, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] [media] rc: raw decoder for keymap protocol is not loaded on" failed to apply to 4.9-stable tree Message-ID: <20170315183359.GA32097@gofer.mess.org> References: <1489563057237168@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1489563057237168@kroah.com> Sender: stable-owner@vger.kernel.org List-ID: On Wed, Mar 15, 2017 at 03:30:57PM +0800, gregkh@linuxfoundation.org wrote: > > The patch below does not apply to the 4.9-stable tree. > If someone wants it applied there, or to any other stable or longterm > tree, then please email the backport, including the original git commit > id to . > > thanks, > > greg k-h > > ------------------ original commit in Linus's tree ------------------ > > >From 413808685dd7c9b54bbc5af79da2eaddd0fc3cb2 Mon Sep 17 00:00:00 2001 > From: Sean Young > Date: Wed, 22 Feb 2017 18:48:01 -0300 > Subject: [PATCH] [media] rc: raw decoder for keymap protocol is not loaded on > register > > 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 > Cc: # v4.5+ > Signed-off-by: Mauro Carvalho Chehab Here is the patch against v4.9.15. Tested. It is also exactly the same patch as v4.10. >>From e6562fca134c947c4421992ae4cbfd00be8a56a0 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 15 Mar 2017 10:51:43 +0000 Subject: [PATCH] [media] rc: raw decoder for keymap protocol is not loaded on register 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 Cc: # v4.5+ Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/rc-main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- 2.9.3