Skip to content

Commit 821e430

Browse files
ye xingchendlezcano
authored andcommitted
thermal/drivers/kirkwood: 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 c818c6d commit 821e430

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/thermal/kirkwood_thermal.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,13 @@ static int kirkwood_thermal_probe(struct platform_device *pdev)
6464
{
6565
struct thermal_zone_device *thermal = NULL;
6666
struct kirkwood_thermal_priv *priv;
67-
struct resource *res;
6867
int ret;
6968

7069
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
7170
if (!priv)
7271
return -ENOMEM;
7372

74-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
75-
priv->sensor = devm_ioremap_resource(&pdev->dev, res);
73+
priv->sensor = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
7674
if (IS_ERR(priv->sensor))
7775
return PTR_ERR(priv->sensor);
7876

0 commit comments

Comments
 (0)