Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Louis Yu <louis.yu@mediatek.com>
To: Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Dawei Chien <dawei.chien@mediatek.com>,
	Fan Chen <fan.chen@mediatek.com>,
	Eddie Huang <eddie.huang@mediatek.com>,
	linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org,
	srv_heupstream@mediatek.com, Louis Yu <louis.yu@mediatek.com>
Subject: [PATCH v2 4/4] thermal: mediatek: minor mtk_thermal.c cleanups
Date: Tue, 1 Aug 2017 15:28:33 +0800	[thread overview]
Message-ID: <1501572513-7958-5-git-send-email-louis.yu@mediatek.com> (raw)
In-Reply-To: <1501572513-7958-1-git-send-email-louis.yu@mediatek.com>

Move independent thermal module reset in the beginning.

Signed-off-by: Louis Yu <louis.yu@mediatek.com>
---
 drivers/thermal/mtk_thermal.c | 8 ++++----
 1 file 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);
-- 
1.8.1.1.dirty

      parent reply	other threads:[~2017-08-01  7:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01  7:28 [PATCH v2 0/4] Add Mediatek thermal driver for mt2712 Louis Yu
2017-08-01  7:28 ` [PATCH v2 1/4] dt-bindings: thermal: Add binding document for Mediatek thermal controller Louis Yu
2017-08-01  7:28 ` [PATCH v2 2/4] thermal: mediatek: add Mediatek thermal driver for mt2712 Louis Yu
2017-08-08 13:23   ` Zhang Rui
2017-08-10  3:32     ` Louis Yu
2017-08-15 11:14       ` Louis Yu
2017-08-25  2:30     ` Zhang Rui
2017-08-25  3:10       ` Dawei Chien
2017-08-25  3:23         ` Zhang Rui
2017-08-25  3:39           ` Dawei Chien
2017-08-31 13:10             ` Zhang Rui
2017-08-31 15:29               ` Matthias Brugger
2017-09-01  1:26               ` Dawei Chien
2017-08-01  7:28 ` [PATCH v2 3/4] thermal: mediatek: extend calibration data for mt2712 chip Louis Yu
2017-08-01  7:28 ` Louis Yu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501572513-7958-5-git-send-email-louis.yu@mediatek.com \
    --to=louis.yu@mediatek.com \
    --cc=dawei.chien@mediatek.com \
    --cc=eddie.huang@mediatek.com \
    --cc=edubezval@gmail.com \
    --cc=fan.chen@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=srv_heupstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox