Commit eab86520 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

media: mtk-cir: only allow protocols that have software decoders

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: default avatarSean Young <sean@mess.org>
Acked-by: default avatarSean Wang <sean.wang@kernel.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent d3bfed33
...@@ -340,7 +340,7 @@ static int mtk_ir_probe(struct platform_device *pdev) ...@@ -340,7 +340,7 @@ static int mtk_ir_probe(struct platform_device *pdev)
ir->rc->map_name = map_name ?: RC_MAP_EMPTY; ir->rc->map_name = map_name ?: RC_MAP_EMPTY;
ir->rc->dev.parent = dev; ir->rc->dev.parent = dev;
ir->rc->driver_name = MTK_IR_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->rx_resolution = MTK_IR_SAMPLE;
ir->rc->timeout = MTK_MAX_SAMPLES * (MTK_IR_SAMPLE + 1); ir->rc->timeout = MTK_MAX_SAMPLES * (MTK_IR_SAMPLE + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment