From patchwork Fri Jul 12 22:46:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 11042717 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 73DA014E5 for ; Fri, 12 Jul 2019 22:47:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 647B026E4F for ; Fri, 12 Jul 2019 22:47:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 586B62855D; Fri, 12 Jul 2019 22:47:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEA2F26E4F for ; Fri, 12 Jul 2019 22:47:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728157AbfGLWrC (ORCPT ); Fri, 12 Jul 2019 18:47:02 -0400 Received: from gofer.mess.org ([88.97.38.141]:57605 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727994AbfGLWrC (ORCPT ); Fri, 12 Jul 2019 18:47:02 -0400 Received: by gofer.mess.org (Postfix, from userid 1000) id ABB956047B; Fri, 12 Jul 2019 23:47:00 +0100 (BST) From: Sean Young To: linux-media@vger.kernel.org Cc: Frank Wunderlich , Sean Wang , linux-mediatek@lists.infradead.org, Matthias Brugger , Ryder Lee Subject: [PATCH 1/3] media: mtk-cir: only allow protocols that have software decoders Date: Fri, 12 Jul 2019 23:46:58 +0100 Message-Id: <20190712224700.11285-1-sean@mess.org> X-Mailer: git-send-email 2.11.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP RC_PROTO_BIT_ALL includes protocols like unknown and other that do not have IR decoders by definition. If these protocols are set in the allowed_protocols, they will show in the protocols sysfs file but cannot be enabled. Signed-off-by: Sean Young Acked-by: Sean Wang --- drivers/media/rc/mtk-cir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c index 46101efe017b..9dc467ebae24 100644 --- a/drivers/media/rc/mtk-cir.c +++ b/drivers/media/rc/mtk-cir.c @@ -342,7 +342,7 @@ static int mtk_ir_probe(struct platform_device *pdev) ir->rc->map_name = map_name ?: RC_MAP_EMPTY; ir->rc->dev.parent = dev; ir->rc->driver_name = MTK_IR_DEV; - ir->rc->allowed_protocols = RC_PROTO_BIT_ALL; + ir->rc->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER; ir->rc->rx_resolution = MTK_IR_SAMPLE; ir->rc->timeout = MTK_MAX_SAMPLES * (MTK_IR_SAMPLE + 1);