diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:20 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 21:21:47 +0100 |
commit | ca36b1ba8c92cbab6f6568283071262592603d59 (patch) | |
tree | f1bd7365a1c58419b48e4e6f7f7bdf19d4050e6a | |
parent | spi: Convert to devm_ioremap_resource() (diff) | |
download | linux-ca36b1ba8c92cbab6f6568283071262592603d59.tar.xz linux-ca36b1ba8c92cbab6f6568283071262592603d59.zip |
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: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/thermal/exynos_thermal.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c index 224751e9f5ff..bada1308318b 100644 --- a/drivers/thermal/exynos_thermal.c +++ b/drivers/thermal/exynos_thermal.c @@ -866,11 +866,9 @@ static int exynos_tmu_probe(struct platform_device *pdev) return -ENOENT; } - data->base = devm_request_and_ioremap(&pdev->dev, data->mem); - if (!data->base) { - dev_err(&pdev->dev, "Failed to ioremap memory\n"); - return -ENODEV; - } + data->base = devm_ioremap_resource(&pdev->dev, data->mem); + if (IS_ERR(data->base)) + return PTR_ERR(data->base); ret = devm_request_irq(&pdev->dev, data->irq, exynos_tmu_irq, IRQF_TRIGGER_RISING, "exynos-tmu", data); |