* [PATCH] media: rc: mtk-cir: use of_device_get_match_data()
[not found] <31f944ab8dfcc1d7b6f03b35657a2a34825b5246.1523347340.git.ryder.lee@mediatek.com>
@ 2018-04-16 2:34 ` Ryder Lee
2018-04-17 3:58 ` Sean Wang
0 siblings, 1 reply; 2+ messages in thread
From: Ryder Lee @ 2018-04-16 2:34 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Sean Wang, linux-media, linux-kernel, linux-arm-kernel,
linux-mediatek, Ryder Lee
The usage of of_device_get_match_data() reduce the code size a bit.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
drivers/media/rc/mtk-cir.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c
index e88eb64..e42efd9 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)) {
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: rc: mtk-cir: use of_device_get_match_data()
2018-04-16 2:34 ` [PATCH] media: rc: mtk-cir: use of_device_get_match_data() Ryder Lee
@ 2018-04-17 3:58 ` Sean Wang
0 siblings, 0 replies; 2+ messages in thread
From: Sean Wang @ 2018-04-17 3:58 UTC (permalink / raw)
To: Ryder Lee
Cc: Mauro Carvalho Chehab, linux-media, linux-kernel,
linux-arm-kernel, linux-mediatek
On Mon, 2018-04-16 at 10:34 +0800, Ryder Lee wrote:
> The usage of of_device_get_match_data() reduce the code size a bit.
>
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
> drivers/media/rc/mtk-cir.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c
> index e88eb64..e42efd9 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)) {
Acked-by: Sean Wang <sean.wang@mediatek.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-17 3:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <31f944ab8dfcc1d7b6f03b35657a2a34825b5246.1523347340.git.ryder.lee@mediatek.com>
2018-04-16 2:34 ` [PATCH] media: rc: mtk-cir: use of_device_get_match_data() Ryder Lee
2018-04-17 3:58 ` Sean Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).