From patchwork Tue Aug 1 07:28:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis Yu X-Patchwork-Id: 9873773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7E1686037D for ; Tue, 1 Aug 2017 07:30:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8430526E4E for ; Tue, 1 Aug 2017 07:30:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79131285DE; Tue, 1 Aug 2017 07:30:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 42B8C26E4E for ; Tue, 1 Aug 2017 07:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vy6himmCuQDqfgjcaKNJ1LjNHbaQyypO7hD8+WgVLyE=; b=ACWrmTH6i9DPwq ZHub2ZUycpcjYTx5mvv0pcuJT/GvVxlI/BFOenwEWhnwhJ/eB3sKnLoq8Bd0vZizGG1k1A4Pevwc7 30Fe4ORoCK58AxJ3GAZD7XErWvQ6BWVJFomKVA0BWlMpD1/6U/nXso4/pm5gUuZe2ihhWoqeQPVgd U1fNzCbtFI7bHDaWgBw5C4mUQvfL4O9aqK/CKccXXobJu1lalhQh5fpEEzKne0feZstIsVrQMJOll PNyP4EaikHOqWeEwB62MAkmLWQHojEuYOMQXbSSlIrIbvzB8wISnl+Y5TgfOApG+9ZBYcUtKGVPdL R6NimnOW73/+jVtLmcXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dcRdF-0004Va-RQ; Tue, 01 Aug 2017 07:30:21 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcRdD-00039B-B2 for linux-mediatek@lists.infradead.org; Tue, 01 Aug 2017 07:30:20 +0000 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1987941158; Tue, 01 Aug 2017 15:29:56 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 1 Aug 2017 15:29:55 +0800 Received: from localhost.localdomain (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Tue, 1 Aug 2017 15:29:54 +0800 From: Louis Yu To: Zhang Rui , Eduardo Valentin , Matthias Brugger Subject: [PATCH v2 4/4] thermal: mediatek: minor mtk_thermal.c cleanups Date: Tue, 1 Aug 2017 15:28:33 +0800 Message-ID: <1501572513-7958-5-git-send-email-louis.yu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1501572513-7958-1-git-send-email-louis.yu@mediatek.com> References: <1501572513-7958-1-git-send-email-louis.yu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170801_003019_535008_78FCD11C X-CRM114-Status: GOOD ( 10.65 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , srv_heupstream@mediatek.com, linux-pm@vger.kernel.org, Louis Yu , Dawei Chien , Fan Chen , Rob Herring , linux-mediatek@lists.infradead.org, Eddie Huang Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Move independent thermal module reset in the beginning. Signed-off-by: Louis Yu --- 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);