projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b1cb9c
)
clk: ti: Use devm_platform_get_and_ioremap_resource()
author
Yangtao Li
<frank.li@vivo.com>
Wed, 5 Jul 2023 06:53:10 +0000
(14:53 +0800)
committer
Stephen Boyd
<sboyd@kernel.org>
Tue, 22 Aug 2023 21:28:31 +0000
(14:28 -0700)
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>
Link:
https://lore.kernel.org/r/20230705065313.67043-10-frank.li@vivo.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/ti/adpll.c
patch
|
blob
|
history
diff --git
a/drivers/clk/ti/adpll.c
b/drivers/clk/ti/adpll.c
index
6ecbba4
..
ff42ea7
100644
(file)
--- 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)