summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/spear_thermal.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2013-05-16 04:16:21 +0200
committerZhang Rui <rui.zhang@intel.com>2013-05-28 04:11:02 +0200
commitc21bec86b6e36143a1fc0be60bbd9dfaebcb88a0 (patch)
tree6843a34244c6066b4ff1909be70e8cee71fa78a2 /drivers/thermal/spear_thermal.c
parentThermal: spear_thermal: convert to devm_ioremap_resource (diff)
downloadlinux-c21bec86b6e36143a1fc0be60bbd9dfaebcb88a0.tar.xz
linux-c21bec86b6e36143a1fc0be60bbd9dfaebcb88a0.zip
Thermal: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. CC: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> CC: Vincenzo Frascino <vincenzo.frascino@st.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Diffstat (limited to 'drivers/thermal/spear_thermal.c')
-rw-r--r--drivers/thermal/spear_thermal.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c
index b9e21611aece..0f37c7279c96 100644
--- a/drivers/thermal/spear_thermal.c
+++ b/drivers/thermal/spear_thermal.c
@@ -118,18 +118,11 @@ static int spear_thermal_probe(struct platform_device *pdev)
return -ENOMEM;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "memory resource missing\n");
- return -ENODEV;
- }
-
/* Enable thermal sensor */
- stdev->thermal_base = devm_ioremap_resource(dev, res);
- if (IS_ERR(stdev->thermal_base)) {
- dev_err(&pdev->dev, "ioremap failed\n");
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ stdev->thermal_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(stdev->thermal_base))
return PTR_ERR(stdev->thermal_base);
- }
stdev->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(stdev->clk)) {