mirror of
https://github.com/torvalds/linux.git
synced 2024-09-21 15:33:19 +00:00
thermal/drivers/hisi: Use devm_platform_ioremap_resource()
According to commit 7945f929f1
("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>
This commit is contained in:
parent
ed4b51b8fd
commit
e45c9a2fc5
|
@ -544,7 +544,6 @@ static int hisi_thermal_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct hisi_thermal_data *data;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
int i, ret;
|
||||
|
||||
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
|
||||
|
@ -555,8 +554,7 @@ static int hisi_thermal_probe(struct platform_device *pdev)
|
|||
platform_set_drvdata(pdev, data);
|
||||
data->ops = of_device_get_match_data(dev);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
data->regs = devm_ioremap_resource(dev, res);
|
||||
data->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(data->regs))
|
||||
return PTR_ERR(data->regs);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user