* [PATCH] clk: sifive: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-07 8:51 Cai Huoqing
0 siblings, 0 replies; only message in thread
From: Cai Huoqing @ 2021-09-07 8:51 UTC (permalink / raw)
To: caihuoqing
Cc: Michael Turquette, Stephen Boyd, Palmer Dabbelt, Paul Walmsley,
linux-clk, linux-riscv, linux-kernel
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.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 80a288c59e56..48c36fefe557 100644
--- a/drivers/clk/sifive/sifive-prci.c
+++ b/drivers/clk/sifive/sifive-prci.c
@@ -572,7 +572,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;
@@ -583,8 +582,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.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-07 8:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 8:51 [PATCH] clk: sifive: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
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).