Skip to content

Commit 9b22743

Browse files
ye xingchendlezcano
authored andcommitted
thermal/drivers/armada: 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: ye xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent b5d6ec4 commit 9b22743

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/thermal/armada_thermal.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,12 +709,10 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev,
709709
struct armada_thermal_priv *priv)
710710
{
711711
struct armada_thermal_data *data = priv->data;
712-
struct resource *res;
713712
void __iomem *base;
714713

715714
/* First memory region points towards the status register */
716-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
717-
base = devm_ioremap_resource(&pdev->dev, res);
715+
base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
718716
if (IS_ERR(base))
719717
return PTR_ERR(base);
720718

0 commit comments

Comments
 (0)