Commit e45c9a2f authored by Yang Li's avatar Yang Li Committed by Daniel Lezcano

thermal/drivers/hisi: Use devm_platform_ioremap_resource()

According to commit 7945f929 ("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: default avatarYang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230308062719.79522-1-yang.lee@linux.alibaba.comSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent ed4b51b8
...@@ -544,7 +544,6 @@ static int hisi_thermal_probe(struct platform_device *pdev) ...@@ -544,7 +544,6 @@ static int hisi_thermal_probe(struct platform_device *pdev)
{ {
struct hisi_thermal_data *data; struct hisi_thermal_data *data;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *res;
int i, ret; int i, ret;
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
...@@ -555,8 +554,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) ...@@ -555,8 +554,7 @@ static int hisi_thermal_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, data); platform_set_drvdata(pdev, data);
data->ops = of_device_get_match_data(dev); data->ops = of_device_get_match_data(dev);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); data->regs = devm_platform_ioremap_resource(pdev, 0);
data->regs = devm_ioremap_resource(dev, res);
if (IS_ERR(data->regs)) if (IS_ERR(data->regs))
return PTR_ERR(data->regs); return PTR_ERR(data->regs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment