Skip to content

Commit 6ac41c5

Browse files
bbkzzgregkh
authored andcommitted
nvmem: uniphier: 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 <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0bc0d6d commit 6ac41c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/nvmem/uniphier-efuse.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ static int uniphier_efuse_probe(struct platform_device *pdev)
4141
if (!priv)
4242
return -ENOMEM;
4343

44-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
45-
priv->base = devm_ioremap_resource(dev, res);
44+
priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
4645
if (IS_ERR(priv->base))
4746
return PTR_ERR(priv->base);
4847

0 commit comments

Comments
 (0)