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>
This commit is contained in:
Louis Yu 2017-08-01 15:28:33 +08:00 committed by Zhang Rui
parent 0a06899334
commit 6760f3f74e

View file

@ -712,16 +712,16 @@ static int mtk_thermal_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
ret = device_reset(&pdev->dev);
if (ret)
return ret;
ret = clk_prepare_enable(mt->clk_auxadc); ret = clk_prepare_enable(mt->clk_auxadc);
if (ret) { if (ret) {
dev_err(&pdev->dev, "Can't enable auxadc clk: %d\n", ret); dev_err(&pdev->dev, "Can't enable auxadc clk: %d\n", ret);
return ret; return ret;
} }
ret = device_reset(&pdev->dev);
if (ret)
goto err_disable_clk_auxadc;
ret = clk_prepare_enable(mt->clk_peri_therm); ret = clk_prepare_enable(mt->clk_peri_therm);
if (ret) { if (ret) {
dev_err(&pdev->dev, "Can't enable peri clk: %d\n", ret); dev_err(&pdev->dev, "Can't enable peri clk: %d\n", ret);