From patchwork Sat Feb 25 11:51:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 39593 X-Patchwork-Delegate: sean@mess.org Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chaul-0004GP-Jb; Sat, 25 Feb 2017 11:53:27 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-8) with esmtp id 1chauj-0002oy-lh; Sat, 25 Feb 2017 12:53:27 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751625AbdBYLwx (ORCPT + 1 other); Sat, 25 Feb 2017 06:52:53 -0500 Received: from gofer.mess.org ([80.229.237.210]:33267 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbdBYLwv (ORCPT ); Sat, 25 Feb 2017 06:52:51 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id B653061640; Sat, 25 Feb 2017 11:51:36 +0000 (GMT) From: Sean Young To: linux-media@vger.kernel.org Subject: [PATCH v3 18/19] [media] lirc: scancode rc devices should have a lirc device too Date: Sat, 25 Feb 2017 11:51:33 +0000 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.2.25.114516 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_1099 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' Now that the lirc interface supports scancodes, RC scancode devices can also have a lirc device, except for cec devices which have their own /dev/cecN interface. Signed-off-by: Sean Young --- drivers/media/rc/rc-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 08b318f..438362b 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -1791,7 +1791,7 @@ int rc_register_device(struct rc_dev *dev) goto out_rx; } - if (dev->driver_type != RC_DRIVER_SCANCODE) { + if (dev->allowed_protocols != RC_BIT_CEC) { rc = ir_lirc_register(dev); if (rc < 0) goto out_raw; @@ -1856,7 +1856,7 @@ void rc_unregister_device(struct rc_dev *dev) if (dev->driver_type == RC_DRIVER_IR_RAW) ir_raw_event_unregister(dev); - if (dev->driver_type != RC_DRIVER_SCANCODE) + if (dev->allowed_protocols != RC_BIT_CEC) ir_lirc_unregister(dev); rc_free_rx_device(dev);