projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c42c3e6
)
media: rc: mtk-cir: use of_device_get_match_data()
author
Ryder Lee
<
[email protected]
>
Mon, 16 Apr 2018 02:34:30 +0000
(22:34 -0400)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Fri, 20 Apr 2018 13:24:04 +0000
(09:24 -0400)
The usage of of_device_get_match_data() reduce the code size a bit.
Signed-off-by: Ryder Lee <
[email protected]
>
Acked-by: Sean Wang <
[email protected]
>
Signed-off-by: Sean Young <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/rc/mtk-cir.c
patch
|
blob
|
history
diff --git
a/drivers/media/rc/mtk-cir.c
b/drivers/media/rc/mtk-cir.c
index e88eb64e8e693c68406592024a7e6297ed80c596..e42efd9d382ec4290413e606b6f6040c28805cfe 100644
(file)
--- 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)) {