Skip to content

Commit 2484b63

Browse files
ye xingchendlezcano
authored andcommitted
thermal/drivers/rockchip: 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 f7f6d37 commit 2484b63

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/thermal/rockchip_thermal.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,6 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
13541354
struct device_node *np = pdev->dev.of_node;
13551355
struct rockchip_thermal_data *thermal;
13561356
const struct of_device_id *match;
1357-
struct resource *res;
13581357
int irq;
13591358
int i;
13601359
int error;
@@ -1378,8 +1377,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
13781377
if (!thermal->chip)
13791378
return -EINVAL;
13801379

1381-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1382-
thermal->regs = devm_ioremap_resource(&pdev->dev, res);
1380+
thermal->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
13831381
if (IS_ERR(thermal->regs))
13841382
return PTR_ERR(thermal->regs);
13851383

0 commit comments

Comments
 (0)