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: 11042723 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 7A87A14DB for ; Fri, 12 Jul 2019 22:47:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6854726E4F for ; Fri, 12 Jul 2019 22:47:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C24728553; Fri, 12 Jul 2019 22:47:17 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0B98926E4F for ; Fri, 12 Jul 2019 22:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=MfqCAsbx3+znqcgLpZLwudUIcjAnnhx+HDUcR3+2u4k=; b=h3P 99/tA5x3l5Kw9sGwrd9sOY0rEgtt8iZpEJJ4QEDVhPBlkkns6Bor07giQIt5d/IWd1L4emG5ueWMt jlauc9eh7zFyyEa519Sk2huuULgG5YWL9rWJs7NGo70+HTGgSf/zqu1pcerdYhs6m7nbVrt+XIskJ DOrFoZAIH+7Ny1Y6BUpErzhuKpqoOOzt+T1SiIWGZsG13U3Aw5kyBvTBg+0efVJC0+N9ZOnvgf3KP BZeDAEobLK8Yd+qFpb9Pa5aE5bwYdZrE2Ig44Lttyz7+mkzZxlyvZ3nndh2ivSzmVJp8eUsK9+tIF lIDllErFGBOzpcggHdBXBL8L2N6j+0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hm4Jv-0002I0-Dy; Fri, 12 Jul 2019 22:47:15 +0000 Received: from gofer.mess.org ([2a02:8011:d000:212::1]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hm4Jr-0002H8-Bq for linux-mediatek@lists.infradead.org; Fri, 12 Jul 2019 22:47:13 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190712_154711_547982_7A12A015 X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthias Brugger , Sean Wang , linux-mediatek@lists.infradead.org, Ryder Lee , Frank Wunderlich MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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);