Commit 5d0af51f authored by Ryder Lee's avatar Ryder Lee Committed by Mauro Carvalho Chehab

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: default avatarRyder Lee <ryder.lee@mediatek.com>
Acked-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent c42c3e61
...@@ -299,8 +299,6 @@ static int mtk_ir_probe(struct platform_device *pdev) ...@@ -299,8 +299,6 @@ static int mtk_ir_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *dn = dev->of_node; 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 resource *res;
struct mtk_ir *ir; struct mtk_ir *ir;
u32 val; u32 val;
...@@ -312,7 +310,7 @@ static int mtk_ir_probe(struct platform_device *pdev) ...@@ -312,7 +310,7 @@ static int mtk_ir_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
ir->dev = dev; ir->dev = dev;
ir->data = of_id->data; ir->data = of_device_get_match_data(dev);
ir->clk = devm_clk_get(dev, "clk"); ir->clk = devm_clk_get(dev, "clk");
if (IS_ERR(ir->clk)) { if (IS_ERR(ir->clk)) {
......
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