]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
thermal: Convert to devm_ioremap_resource()
authorThierry Reding <thierry.reding@avionic-design.de>
Mon, 21 Jan 2013 10:09:20 +0000 (11:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Jan 2013 20:21:47 +0000 (12:21 -0800)
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>
drivers/thermal/exynos_thermal.c

index 224751e9f5ff3659448796da7d5323ec738f0770..bada1308318bc0cd31b94cb8433508b04a898b8d 100644 (file)
@@ -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);