Skip to content

Commit 183a1f1

Browse files
bbkzzbebarino
authored andcommitted
clk: ti: Use devm_platform_get_and_ioremap_resource()
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>
1 parent 9b1cb9c commit 183a1f1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/clk/ti/adpll.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -881,14 +881,10 @@ static int ti_adpll_probe(struct platform_device *pdev)
881881
dev_set_drvdata(d->dev, d);
882882
spin_lock_init(&d->lock);
883883

884-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
885-
if (!res)
886-
return -ENODEV;
887-
d->pa = res->start;
888-
889-
d->iobase = devm_ioremap_resource(dev, res);
884+
d->iobase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
890885
if (IS_ERR(d->iobase))
891886
return PTR_ERR(d->iobase);
887+
d->pa = res->start;
892888

893889
err = ti_adpll_init_registers(d);
894890
if (err)

0 commit comments

Comments
 (0)