Message ID | 20230811130351.7038-6-adrian.hunter@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1158782vqi; Fri, 11 Aug 2023 08:04:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZJabXV2Y40p0TWOJYKZliD4iFS2Y1CrXo9tNSzboSWkPDUd57EY/+nITne5XlRvzSX+RN X-Received: by 2002:a17:903:2286:b0:1b8:78e:7c1 with SMTP id b6-20020a170903228600b001b8078e07c1mr2522472plh.51.1691766277885; Fri, 11 Aug 2023 08:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691766277; cv=none; d=google.com; s=arc-20160816; b=D0yqbjItIuqmuecZ5KoQi1uQK97FL6LRn4zN39FR88psnuQ8C38/vXNR9svnO3NTKn 3JHYi5dM1egf/e1gSrvN0hWscYK4wwExD/kw3f8lfzUw0su3W6XMvxafpIboVOcSPgo0 0/jB2jdA8Q7ck0Lh/CN4ol8IF85NhDuO3Hogy/TeNePi0WoS9XFJdpuNRWk2FzKOSS+9 arJWKDseXWDQime36Co7YQDqqlU5Gp0GgLwFi8PQamCNLhKJsFOIVBcWWqKwxaZuD5/z hQfuJKRMM4XjcvLlr3m4mRy0x/9N395ti/Lv9gTFtoOWHgl3R3d1iTM92+0DE9sDu8dD jp2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8T1lr4ltk+Kq6FIZTgDQ/WAyK+NpjutSt32zvYP6qM0=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=waV33NWCI4YOnirOMjw8JMu1i5+QZPJxxbNXPNtCk+uYUG7y/sdp7VvDzjWfua5epQ vwewIEhtXb7zbuiT8oYmMICinkEr0BeoygPKgXZ+eaoxYojSv+38rCZvoIgz2uQ3RiY/ aC0Xgqduuat/d49RSz3J1jbAbidbeRJM+vw0ZfTBmXGo+Np2azAENrouHjiwWlxZd5FH /Kz13cjUfPuY8k/BXFDVOrFWGxduENGEmXVK28s80L0Dd1RBh8eh3orr0nfxF3DBnxFH TxtfSSG+7p8NMriQgW1LkdSqkHxV/afVdnJB5FDfs8sRxg19OiEiK5yOofamznrJmK92 BLjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=js+nRpdH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a170902a3c300b001b9ea0f0e8esi3288756plb.650.2023.08.11.08.04.13; Fri, 11 Aug 2023 08:04:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=js+nRpdH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234953AbjHKNFk (ORCPT <rfc822;shaohuahua6@gmail.com> + 99 others); Fri, 11 Aug 2023 09:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236001AbjHKNFI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Aug 2023 09:05:08 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1330230E9; Fri, 11 Aug 2023 06:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759096; x=1723295096; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xZrErSzsM0EXMApP7R+1ojq0A8MKbG/2/kUip18lDpw=; b=js+nRpdHQgya5vRtu0GHXmUBd9fLhq10FOOfrnyE64YNlZ/PzGrii87m 9yrW+AMvUZ9KLRIFRAXRp8Cgv23xktnxoGbbkcaXp5xU2LcAo/tPd3Fi1 11aDWH0TNtMQWD5MC3zJaygXtKiDXmyZ0c6WGe6KgPKpKeqanXl625kkv icvZUFC7RChGrG6g9AnuZA+osjncPtbbGA8r6NuSNCqpNm9WnrR9BRuU8 8KzLVK+RPfPEWCi2O52TEZj6Z/fT+uzlWKo/iMJ41qmoab+nzdYJwyES3 E8ofd/641eAklHPaY5fxo4cQvwpjgpyEASPrKS7KOL+sdicCmnx1MkEIR w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811843" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811843" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535225" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535225" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:46 -0700 From: Adrian Hunter <adrian.hunter@intel.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Yangtao Li <frank.li@vivo.com> Cc: Florian Fainelli <florian.fainelli@broadcom.com>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Kamal Dasu <kamal.dasu@broadcom.com>, Al Cooper <alcooperx@gmail.com>, Michal Simek <michal.simek@amd.com>, Eugen Hristev <eugen.hristev@collabora.com>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@microchip.com>, Lars Povlsen <lars.povlsen@microchip.com>, Steen Hegelund <Steen.Hegelund@microchip.com>, Daniel Machon <daniel.machon@microchip.com>, UNGLinuxDriver@microchip.com, Patrice Chotard <patrice.chotard@foss.st.com>, Brian Norris <briannorris@chromium.org>, Ye Xingchen <ye.xingchen@zte.com.cn>, Brad Larson <blarson@amd.com>, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>, Swati Agarwal <swati.agarwal@amd.com>, Andy Tang <andy.tang@nxp.com>, Georgii Kruglov <georgy.kruglov@yandex.ru>, Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, Doug Brown <doug@schmorgal.com>, Li Zetao <lizetao1@huawei.com>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com>, Jassi Brar <jaswinder.singh@linaro.org>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 05/16] mmc: sdhci-dove: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:40 +0300 Message-Id: <20230811130351.7038-6-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773945516403849723 X-GMAIL-MSGID: 1773945516403849723 |
Series |
mmc: sdhci-pltfm: Minor clean up
|
|
Commit Message
Adrian Hunter
Aug. 11, 2023, 1:03 p.m. UTC
Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that
devm_clk_get_enabled() can be used for pltfm_host->clk.
This has the side effect that the order of operations on the error path
and remove path is not the same as it was before, but should be safe
nevertheless.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci-dove.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c index 75335dbf223c..88ec23417808 100644 --- a/drivers/mmc/host/sdhci-dove.c +++ b/drivers/mmc/host/sdhci-dove.c @@ -75,10 +75,7 @@ static int sdhci_dove_probe(struct platform_device *pdev) return PTR_ERR(host); pltfm_host = sdhci_priv(host); - pltfm_host->clk = devm_clk_get(&pdev->dev, NULL); - - if (!IS_ERR(pltfm_host->clk)) - clk_prepare_enable(pltfm_host->clk); + pltfm_host->clk = devm_clk_get_enabled(&pdev->dev, NULL); ret = mmc_of_parse(host->mmc); if (ret) @@ -91,7 +88,6 @@ static int sdhci_dove_probe(struct platform_device *pdev) return 0; err_sdhci_add: - clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); return ret; } @@ -110,7 +106,7 @@ static struct platform_driver sdhci_dove_driver = { .of_match_table = sdhci_dove_of_match_table, }, .probe = sdhci_dove_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_dove_driver);