mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] clk: sifive: Use devm_platform_ioremap_resource()
@ 2023-04-28  7:00 Yang Li
  2023-06-15  0:20 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2023-04-28  7:00 UTC (permalink / raw)
  To: mturquette
  Cc: sboyd, palmer, paul.walmsley, linux-clk, linux-riscv,
	linux-kernel, Yang Li

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

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/clk/sifive/sifive-prci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c
index 916d2fc28b9c..e317f3454e93 100644
--- a/drivers/clk/sifive/sifive-prci.c
+++ b/drivers/clk/sifive/sifive-prci.c
@@ -567,7 +567,6 @@ static int __prci_register_clocks(struct device *dev, struct __prci_data *pd,
 static int sifive_prci_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	struct __prci_data *pd;
 	const struct prci_clk_desc *desc;
 	int r;
@@ -578,8 +577,7 @@ static int sifive_prci_probe(struct platform_device *pdev)
 	if (!pd)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pd->va = devm_ioremap_resource(dev, res);
+	pd->va = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pd->va))
 		return PTR_ERR(pd->va);
 
-- 
2.20.1.7.g153144c


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

* Re: [PATCH -next] clk: sifive: Use devm_platform_ioremap_resource()
  2023-04-28  7:00 [PATCH -next] clk: sifive: Use devm_platform_ioremap_resource() Yang Li
@ 2023-06-15  0:20 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2023-06-15  0:20 UTC (permalink / raw)
  To: Yang Li, mturquette
  Cc: palmer, paul.walmsley, linux-clk, linux-riscv, linux-kernel, Yang Li

Quoting Yang Li (2023-04-28 00:00:05)
> Convert platform_get_resource(),devm_ioremap_resource() to a single
> call to devm_platform_ioremap_resource(), as this is exactly what this
> function does.
> 
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---

Applied to clk-next

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

end of thread, other threads:[~2023-06-15  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-28  7:00 [PATCH -next] clk: sifive: Use devm_platform_ioremap_resource() Yang Li
2023-06-15  0:20 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®