summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorLouis Yu <louis.yu@mediatek.com>2017-08-01 15:28:33 +0800
committerZhang Rui <rui.zhang@intel.com>2017-08-31 21:13:53 +0800
commit6760f3f74e72d690bc47b8a1ca1716d2f2e4ad74 (patch)
treeac0ae756d521e8d34bfd34fdfaf5c83edecdf608 /drivers/thermal
parent0a0689933404c50f9ee2122b69b4be83e984afa2 (diff)
downloadop-kernel-dev-6760f3f74e72d690bc47b8a1ca1716d2f2e4ad74.zip
op-kernel-dev-6760f3f74e72d690bc47b8a1ca1716d2f2e4ad74.tar.gz
thermal: mediatek: minor mtk_thermal.c cleanups
Move independent thermal module reset in the beginning. Signed-off-by: Louis Yu <louis.yu@mediatek.com> Reviewed-by: Dawei Chien <dawei.chien@mediatek.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/mtk_thermal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c
index b609589..1e61c09 100644
--- a/drivers/thermal/mtk_thermal.c
+++ b/drivers/thermal/mtk_thermal.c
@@ -712,16 +712,16 @@ static int mtk_thermal_probe(struct platform_device *pdev)
return -EINVAL;
}
+ ret = device_reset(&pdev->dev);
+ if (ret)
+ return ret;
+
ret = clk_prepare_enable(mt->clk_auxadc);
if (ret) {
dev_err(&pdev->dev, "Can't enable auxadc clk: %d\n", ret);
return ret;
}
- ret = device_reset(&pdev->dev);
- if (ret)
- goto err_disable_clk_auxadc;
-
ret = clk_prepare_enable(mt->clk_peri_therm);
if (ret) {
dev_err(&pdev->dev, "Can't enable peri clk: %d\n", ret);
OpenPOWER on IntegriCloud