Skip to content

Commit e45c9a2

Browse files
Yang Lidlezcano
authored andcommitted
thermal/drivers/hisi: Use devm_platform_ioremap_resource()
According to commit 7945f92 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to Use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230308062719.79522-1-yang.lee@linux.alibaba.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent ed4b51b commit e45c9a2

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/thermal/hisi_thermal.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ static int hisi_thermal_probe(struct platform_device *pdev)
544544
{
545545
struct hisi_thermal_data *data;
546546
struct device *dev = &pdev->dev;
547-
struct resource *res;
548547
int i, ret;
549548

550549
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
@@ -555,8 +554,7 @@ static int hisi_thermal_probe(struct platform_device *pdev)
555554
platform_set_drvdata(pdev, data);
556555
data->ops = of_device_get_match_data(dev);
557556

558-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
559-
data->regs = devm_ioremap_resource(dev, res);
557+
data->regs = devm_platform_ioremap_resource(pdev, 0);
560558
if (IS_ERR(data->regs))
561559
return PTR_ERR(data->regs);
562560

0 commit comments

Comments
 (0)