Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca36b1ba authored by Thierry Reding's avatar Thierry Reding Committed by Greg Kroah-Hartman
Browse files

thermal: Convert to devm_ioremap_resource()



Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b0ee5605
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -866,11 +866,9 @@ static int exynos_tmu_probe(struct platform_device *pdev)
		return -ENOENT;
		return -ENOENT;
	}
	}


	data->base = devm_request_and_ioremap(&pdev->dev, data->mem);
	data->base = devm_ioremap_resource(&pdev->dev, data->mem);
	if (!data->base) {
	if (IS_ERR(data->base))
		dev_err(&pdev->dev, "Failed to ioremap memory\n");
		return PTR_ERR(data->base);
		return -ENODEV;
	}


	ret = devm_request_irq(&pdev->dev, data->irq, exynos_tmu_irq,
	ret = devm_request_irq(&pdev->dev, data->irq, exynos_tmu_irq,
		IRQF_TRIGGER_RISING, "exynos-tmu", data);
		IRQF_TRIGGER_RISING, "exynos-tmu", data);