aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:20 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 15:21:47 -0500
commitca36b1ba8c92cbab6f6568283071262592603d59 (patch)
treef1bd7365a1c58419b48e4e6f7f7bdf19d4050e6a /drivers/thermal
parentb0ee5605234a24f209b803f691957e5012eebf9a (diff)
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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/exynos_thermal.c8
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)
866 return -ENOENT; 866 return -ENOENT;
867 } 867 }
868 868
869 data->base = devm_request_and_ioremap(&pdev->dev, data->mem); 869 data->base = devm_ioremap_resource(&pdev->dev, data->mem);
870 if (!data->base) { 870 if (IS_ERR(data->base))
871 dev_err(&pdev->dev, "Failed to ioremap memory\n"); 871 return PTR_ERR(data->base);
872 return -ENODEV;
873 }
874 872
875 ret = devm_request_irq(&pdev->dev, data->irq, exynos_tmu_irq, 873 ret = devm_request_irq(&pdev->dev, data->irq, exynos_tmu_irq,
876 IRQF_TRIGGER_RISING, "exynos-tmu", data); 874 IRQF_TRIGGER_RISING, "exynos-tmu", data);