Skip to content

Commit c645481

Browse files
bbkzzpH5
authored andcommitted
reset: uniphier-glue: 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/20230704120211.38122-7-frank.li@vivo.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent 5d58701 commit c645481

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/reset/reset-uniphier-glue.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ static int uniphier_glue_reset_probe(struct platform_device *pdev)
5858
priv->data->nrsts > MAX_RSTS))
5959
return -EINVAL;
6060

61-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
62-
priv->rdata.membase = devm_ioremap_resource(dev, res);
61+
priv->rdata.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
6362
if (IS_ERR(priv->rdata.membase))
6463
return PTR_ERR(priv->rdata.membase);
6564

0 commit comments

Comments
 (0)