From patchwork Thu Aug 30 11:50:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10581603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 964E95A4 for ; Thu, 30 Aug 2018 11:54:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 855562B5D1 for ; Thu, 30 Aug 2018 11:54:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78A7B2B612; Thu, 30 Aug 2018 11:54:44 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 CF88C2B5D1 for ; Thu, 30 Aug 2018 11:54:43 +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=OwqyMLIc3aSRAsPyWItrYKWsjEphx9sG8ONDScccbGc=; b=IyA3dqZ7yqossl vqpIxqNPoRw0OX6QG9F4YY3nj/nsObufPbhQDrcxKx+rp10OngLiRdsrRbcOjJGBHL0Mhi2EeSynW DGzXtn3QH3+TF80yyogjYFFC8Mrx0MVoICJez07R73YvxP1B4qpwbXMdC3zT5JL6vBxWcP4HLpbit 4iQsa4NEvs5d5wHY0oGU9ciW6Y1FRYnovdE2icmAsnv+OST3QRjCp4hlfpNvQJCBiyBaVKjM5h7CR XCpgS+fr/4LiffMo0446cxCew73kYKMITHYI1KbckiNIm1AkkrWhbtvMYj5GfT6Y2bJMekFcMb7k+ 8W6+15hszDaVQKDJK/sQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvLWt-0004vN-Jh; Thu, 30 Aug 2018 11:54:27 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvLTS-0003Rm-PI for linux-arm-kernel@bombadil.infradead.org; Thu, 30 Aug 2018 11:50:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4n2Szb4mtDXHuCL+cbNgCIQEndOgXLIl5up3rtkHccs=; b=h9X67IlNyuWd+fsnfIAvFhZAd KH3F/mfzyCOVrbiiNUyNFdRTe5upC06C+a4CULaxHOYov93Y1cMfkWrsGQzONBilLBlYIQwExzXES ekL+1HYXrUBFwiQkVUhx3hinOLbPq2acpOY4VI+qTz5U9FKyObyp/pjsSrJ78U/nuP90GjBIVJf2t cZVGVcFl+K15mLar7FKX6vC5bBuKvbjkzAvVCThwO/r+bPFgsBj84MWHtyezwAu7huyBXatGk6tzZ nWWSRwz0PLs3hWjDgHVaXBHVSG0FofZhHtirWLHRCvWCGkptSJhmOP+7MbqGjTigaSjVAo7t3gprJ Orm5YOmbw==; Received: from esa4.microchip.iphmx.com ([68.232.154.123]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvLTQ-0008R2-7M for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 11:50:52 +0000 X-IronPort-AV: E=Sophos;i="5.53,306,1531810800"; d="scan'208";a="18692641" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Aug 2018 04:50:39 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.76.4) by chn-sv-exch05.mchp-main.com (10.10.76.106) with Microsoft SMTP Server id 14.3.352.0; Thu, 30 Aug 2018 04:50:39 -0700 From: Claudiu Beznea To: , , , Subject: [PATCH 4/6] power: reset: at91-poweroff: make sclk part of struct shdwc Date: Thu, 30 Aug 2018 14:50:09 +0300 Message-ID: <1535629811-13403-5-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535629811-13403-1-git-send-email-claudiu.beznea@microchip.com> References: <1535629811-13403-1-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_075052_434493_0F03C52E X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Claudiu Beznea , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Make sclk part of struct shdwc to have all the data specific to SHDWC grouped together in one structure. Signed-off-by: Claudiu Beznea --- drivers/power/reset/at91-sama5d2_shdwc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c index c9994103248e..945b41b4086a 100644 --- a/drivers/power/reset/at91-sama5d2_shdwc.c +++ b/drivers/power/reset/at91-sama5d2_shdwc.c @@ -70,6 +70,7 @@ struct shdwc_config { struct shdwc { const struct shdwc_config *cfg; + struct clk *sclk; void __iomem *at91_shdwc_base; void __iomem *mpddrc_base; void __iomem *pmc_base; @@ -80,7 +81,6 @@ struct shdwc { * since pm_power_off itself is global. */ static struct shdwc *at91_shdwc; -static struct clk *sclk; static const unsigned long long sdwc_dbc_period[] = { 0, 3, 32, 512, 4096, 32768, @@ -271,11 +271,11 @@ static int __init at91_shdwc_probe(struct platform_device *pdev) match = of_match_node(at91_shdwc_of_match, pdev->dev.of_node); at91_shdwc->cfg = match->data; - sclk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(sclk)) - return PTR_ERR(sclk); + at91_shdwc->sclk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(at91_shdwc->sclk)) + return PTR_ERR(at91_shdwc->sclk); - ret = clk_prepare_enable(sclk); + ret = clk_prepare_enable(at91_shdwc->sclk); if (ret) { dev_err(&pdev->dev, "Could not enable slow clock\n"); return ret; @@ -328,7 +328,7 @@ static int __init at91_shdwc_probe(struct platform_device *pdev) unmap: iounmap(at91_shdwc->pmc_base); clk_disable: - clk_disable_unprepare(sclk); + clk_disable_unprepare(at91_shdwc->sclk); return ret; } @@ -348,7 +348,7 @@ static int __exit at91_shdwc_remove(struct platform_device *pdev) iounmap(shdw->mpddrc_base); iounmap(shdw->pmc_base); - clk_disable_unprepare(sclk); + clk_disable_unprepare(shdw->sclk); return 0; }