Skip to content

Commit 142887e

Browse files
ye xingchendlezcano
authored andcommitted
thermal/drivers/bcm2835: 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]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 780e220 commit 142887e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/thermal/broadcom/bcm2835_thermal.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
167167
const struct of_device_id *match;
168168
struct thermal_zone_device *tz;
169169
struct bcm2835_thermal_data *data;
170-
struct resource *res;
171170
int err = 0;
172171
u32 val;
173172
unsigned long rate;
@@ -181,8 +180,7 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
181180
if (!match)
182181
return -EINVAL;
183182

184-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
185-
data->regs = devm_ioremap_resource(&pdev->dev, res);
183+
data->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
186184
if (IS_ERR(data->regs)) {
187185
err = PTR_ERR(data->regs);
188186
return err;

0 commit comments

Comments
 (0)