From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Young 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Matthias Brugger , Sean Wang , linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Ryder Lee , Frank Wunderlich List-Id: linux-mediatek@lists.infradead.org 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 --- 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); -- 2.21.0