linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 10/13] clk: ti: Use devm_platform_get_and_ioremap_resource()
       [not found] <20230705065313.67043-1-frank.li@vivo.com>
@ 2023-07-05  6:53 ` Yangtao Li
  2023-08-22 21:52   ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2023-07-05  6:53 UTC (permalink / raw)
  To: Tero Kristo, Michael Turquette, Stephen Boyd
  Cc: Yangtao Li, linux-omap, linux-clk, linux-kernel

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/clk/ti/adpll.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/ti/adpll.c b/drivers/clk/ti/adpll.c
index 6ecbba4342c5..ff42ea75cb43 100644
--- a/drivers/clk/ti/adpll.c
+++ b/drivers/clk/ti/adpll.c
@@ -881,14 +881,10 @@ static int ti_adpll_probe(struct platform_device *pdev)
 	dev_set_drvdata(d->dev, d);
 	spin_lock_init(&d->lock);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-	d->pa = res->start;
-
-	d->iobase = devm_ioremap_resource(dev, res);
+	d->iobase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(d->iobase))
 		return PTR_ERR(d->iobase);
+	d->pa = res->start;
 
 	err = ti_adpll_init_registers(d);
 	if (err)
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 10/13] clk: ti: Use devm_platform_get_and_ioremap_resource()
  2023-07-05  6:53 ` [PATCH 10/13] clk: ti: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-08-22 21:52   ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2023-08-22 21:52 UTC (permalink / raw)
  To: Michael Turquette, Tero Kristo, Yangtao Li
  Cc: Yangtao Li, linux-omap, linux-clk, linux-kernel

Quoting Yangtao Li (2023-07-04 23:53:10)
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-22 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230705065313.67043-1-frank.li@vivo.com>
2023-07-05  6:53 ` [PATCH 10/13] clk: ti: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-08-22 21:52   ` Stephen Boyd

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).