summaryrefslogtreecommitdiff
path: root/drivers/media/rc/mtk-cir.c
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2018-04-16 05:34:30 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-04-20 16:24:04 +0300
commit5d0af51face3ef84c23dd4e8d8b8c2730450bf0a (patch)
tree69a4b330bf055dab916512f422ca782913857056 /drivers/media/rc/mtk-cir.c
parentc42c3e61bf037cdfc503e7d83e2df118f5570f76 (diff)
downloadlinux-5d0af51face3ef84c23dd4e8d8b8c2730450bf0a.tar.xz
media: rc: mtk-cir: use of_device_get_match_data()
The usage of of_device_get_match_data() reduce the code size a bit. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Acked-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/mtk-cir.c')
-rw-r--r--drivers/media/rc/mtk-cir.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c
index e88eb64e8e69..e42efd9d382e 100644
--- a/drivers/media/rc/mtk-cir.c
+++ b/drivers/media/rc/mtk-cir.c
@@ -299,8 +299,6 @@ static int mtk_ir_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *dn = dev->of_node;
- const struct of_device_id *of_id =
- of_match_device(mtk_ir_match, &pdev->dev);
struct resource *res;
struct mtk_ir *ir;
u32 val;
@@ -312,7 +310,7 @@ static int mtk_ir_probe(struct platform_device *pdev)
return -ENOMEM;
ir->dev = dev;
- ir->data = of_id->data;
+ ir->data = of_device_get_match_data(dev);
ir->clk = devm_clk_get(dev, "clk");
if (IS_ERR(ir->clk)) {