From patchwork Fri Aug 11 13:03:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134542 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1150453vqi; Fri, 11 Aug 2023 07:51:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHp/bZMYLJrtuukYN/Gxw+9kss5PhJZAtxlqj/eYuuKYWypMq022rovvYh2rfeRJp3ixL+U X-Received: by 2002:a05:6870:5887:b0:1bf:7cdc:df0 with SMTP id be7-20020a056870588700b001bf7cdc0df0mr1976432oab.35.1691765505086; Fri, 11 Aug 2023 07:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691765505; cv=none; d=google.com; s=arc-20160816; b=Fnzcw3rEuEGVkz3sv2/mvlZp2fIJHhQMYfHx8yI6O43wt3GIy5iIGutMRo5RNztA9Q QNfc5QZALezKMKBidHNMXENYjDcwX3AfUbDaAxmpoxh+Eij4t9VV0HhVJkSCyqr68oug HlHQt4EuTn1FzMZpZWX60gNmxKQEDx1BkwW9PM7kZy+erIzgMBRnDC1fyZ+G6IcryDPM Aua37VcdLvPEosz9rIPPIOycAOFA/qtSX1XHi47622gcOr9oB7Gi+vt1YMX8cVAdSXMm Z5Is9u4Td3ZJV7HT7n025J34TEv3HZHJzWBkXU/+0ErjU1dheLQR7zu2HCAb8mMtRf5E uZ7A== 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=8swvBBVrioTk9DpFcRTiso1u4KjIa1DSTLSBIHuRTvw=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=c3aglKI3GvmAJuwMCI4bDMVcyFYTtyHjWGk6F0CGPkJB/M50hcMqdFGFP5utho4SJk NLYbBpMOBf8aSD0v8SQZ5iRbbt+jSantbB5jbLMyzSf3PFh23/rq/RQhPtYLG8m7v7HW aAwpk5KuQXtTRfQz4Oez7LI4/5CRvDAYkvjDDXJY31+khfhnLPFndl4u8QevUeyopc78 0e6p3OabgjnnYCx/jgfU8VXnXJLFk299o6104DscL6rtBTHjuTgfU8P3Bl0W9d0f6zUL 05ntGDL4v0GmYey/Re0x3B6UryPBCsDS/hbJKAWscuQaR5YP40pUsmowuFwB4bP0+SdK Ellg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eHANacZc; 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 g15-20020a17090a7d0f00b00262ffca5a31si5508194pjl.161.2023.08.11.07.51.31; Fri, 11 Aug 2023 07:51:45 -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=eHANacZc; 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 S235820AbjHKNEf (ORCPT + 99 others); Fri, 11 Aug 2023 09:04:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235746AbjHKNEX (ORCPT ); Fri, 11 Aug 2023 09:04:23 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 212A22D52; Fri, 11 Aug 2023 06:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759061; x=1723295061; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AjEg3FTVN+rBx+5E/fDJF0wydV3uUpzFCc6aneAIa5Q=; b=eHANacZcC46eknhksq1EenBqnkxYAiKltx0UYJ5fFRPjI59UPBAbYV9Q bagyR53Gpm0dojczMiJgAE1lLqTnXmzM9sRIW4y9ZE44lAiI0ab9x28/c dVpdGyxQQ5M0wafVLpSGGqTTLJMa5TV0Ih4MS0SpNY0FR5z381VqJdIaX ycmJCC7Es+SuTTctYgIadrXQQEB1KGdLAgZSO9bHUQY56M/CJWBF0kUUB w+kA8ZTUzZxKgVfQ5NCysUraGCC7gtiAy1qHJOJmT8Dzitjs3alqAevp5 ScGjGXmbzDtUxebsEVMuKyMc8XH9uN6u3vXuTxvqiBxtxpqU7H3cpn2p7 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811656" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811656" 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:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535181" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535181" 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:11 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/16] mmc: sdhci-pltfm: Add sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:36 +0300 Message-Id: <20230811130351.7038-2-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773944706322746003 X-GMAIL-MSGID: 1773944706322746003 Add sdhci_pltfm_remove() to replace sdhci_pltfm_unregister(). The difference is that sdhci_pltfm_remove() does not do: clk_disable_unprepare(pltfm_host->clk); which allows drivers to choose to use devm_clk_get_enabled() or similar, for pltfm_host->clk. Once all drivers using sdhci_pltfm_unregister() have been amended to use sdhci_pltfm_remove() instead, sdhci_pltfm_unregister() will be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-pltfm.c | 10 ++++++++++ drivers/mmc/host/sdhci-pltfm.h | 1 + 2 files changed, 11 insertions(+) diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 72d07b49b0a3..5a63c8818987 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -199,6 +199,16 @@ void sdhci_pltfm_unregister(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); +void sdhci_pltfm_remove(struct platform_device *pdev) +{ + struct sdhci_host *host = platform_get_drvdata(pdev); + int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff); + + sdhci_remove_host(host, dead); + sdhci_pltfm_free(pdev); +} +EXPORT_SYMBOL_GPL(sdhci_pltfm_remove); + #ifdef CONFIG_PM_SLEEP int sdhci_pltfm_suspend(struct device *dev) { diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 6e6a443dafd9..402f4edc6ca5 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -103,6 +103,7 @@ extern int sdhci_pltfm_register(struct platform_device *pdev, const struct sdhci_pltfm_data *pdata, size_t priv_size); extern void sdhci_pltfm_unregister(struct platform_device *pdev); +extern void sdhci_pltfm_remove(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host); From patchwork Fri Aug 11 13:03:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134500 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1098915vqi; Fri, 11 Aug 2023 06:35:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHiho8clLlnVmMlqhUJbMkZoIm+01S4OVvEDGWOjPns3bEca3YxRaC75IbNahVupNwaqibo X-Received: by 2002:a92:c910:0:b0:349:3ca:bd1d with SMTP id t16-20020a92c910000000b0034903cabd1dmr2115781ilp.25.1691760904592; Fri, 11 Aug 2023 06:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691760904; cv=none; d=google.com; s=arc-20160816; b=H1qNsaD1b0fGOp5rJ2VTRQuaNA6SgM3+ZApBrxAVL6bJmjolaTZ7OtvuS0lCwr1UKn fCYZLqhiv2B9n27CAfTbv/vDwhWn4ea8/FcFQ9kAll7YWGNy7QKdspvg6aARYNT45rV+ ILr5dJURIZhWA20OsUckptKh0/gl3e9OWoxXap+wqn6o0IL37m2RYKvzOuw4XKG6ZgSx bZblJyuo6anM4OtBjbk7yYXjioYMMLUwB9I6R3386Mo/N/NNCVmTEn5IaRSPqnHJCwnv jQOUe3j82VlUxKsOw9nmPX4absbX/2oCARV2KWj6U1gnVdDfdJw2i7Mq03NOYlRMm4yd 3L6Q== 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=iin3wiPA+PavznQdp7yAoTrlUA6bkzxNrDPw2GSwwQI=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=su1khl9XquHEneA+rtgHlcwpn2DAMcCxPcF50vHNHAp+RQtgR2rPTfXg5OezKhlh1L v34H0eBGfDvQ5admoERp0A6/dQLPm2my3lKtfk4Wv7F0vSguxVvSFt+UUBGfCEA7a+vU 53OfpGrfUlazD4gSEHT4wWfdNlBIwSmO431MN4+bQa/CwLUzsrX5hC6v0b0jTxWPv78s jubWs+3Pysk0C6IV7d9yzD5/b45N9L1GI+NWuLDvPUQG6nSLYaT8bN/5+nTi++C7efht xVCaOHWSLeo2tk6fIHafx4DrVz/EsytBpXoG3M6qvwnw67gd170rPTpZqz7ofYdvidaS KsYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fVlK+jOW; 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 e1-20020a656781000000b00564b8e5521csi3275141pgr.214.2023.08.11.06.34.51; Fri, 11 Aug 2023 06:35:04 -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=fVlK+jOW; 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 S236265AbjHKNEx (ORCPT + 99 others); Fri, 11 Aug 2023 09:04:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236380AbjHKNEb (ORCPT ); Fri, 11 Aug 2023 09:04:31 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FF7030D6; Fri, 11 Aug 2023 06:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759071; x=1723295071; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DIC96ebnUuCHNyIRxeKIBfaOMFZiMuJ8mbYu9+QOiuk=; b=fVlK+jOWzuCP/uX0XfDvqsEhrrZ3/5MRyEH8HRTgR/PHxHz1DrkKm1yV m3cOrNTPfqYBaeovOL/2k7n40XoAnDW37cyb2Y90gWt6dh0xr50Dy1gW6 yEssmbfIL+LJRekq7bAVUB7OOdx60CyN0X1288KFgUN5d4+ug7gtu9Q1+ CgJJZOGkUyV1m/7kYa6zitrBYtauLLd+46GCu8722L1VeAOwSATyfA3Bp tOJzlfXUghLqOS38rAZ7dRlI17mF48NV4HvFuU/wghPbgCR1MumFRiJtB Ww4+NBkVi2A7qNQ8tB2BqHNxbKo0V+gnN8tYptATqTQE5gLmZbHsQasaN A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811713" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811713" 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:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535197" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535197" 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:20 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 02/16] mmc: sdhci-bcm-kona: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:37 +0300 Message-Id: <20230811130351.7038-3-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773939882074190233 X-GMAIL-MSGID: 1773939882074190233 Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-bcm-kona.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index 02bb871e838f..cb9152c6a65d 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -310,6 +310,16 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev) return ret; } +static void sdhci_bcm_kona_remove(struct platform_device *pdev) +{ + struct sdhci_host *host = platform_get_drvdata(pdev); + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct clk *clk = pltfm_host->clk; + + sdhci_pltfm_remove(pdev); + clk_disable_unprepare(clk); +} + static struct platform_driver sdhci_bcm_kona_driver = { .driver = { .name = "sdhci-kona", @@ -318,7 +328,7 @@ static struct platform_driver sdhci_bcm_kona_driver = { .of_match_table = sdhci_bcm_kona_of_match, }, .probe = sdhci_bcm_kona_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_bcm_kona_remove, }; module_platform_driver(sdhci_bcm_kona_driver); From patchwork Fri Aug 11 13:03:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134549 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1160181vqi; Fri, 11 Aug 2023 08:06:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfiMnh3bk4dh/6GZNG7d+L9GG1KjKTZ7gELjhaGbFdq8G0up1BzGdOQqoS+fENUlLrW8gn X-Received: by 2002:a17:902:6b4b:b0:1b6:80f0:d969 with SMTP id g11-20020a1709026b4b00b001b680f0d969mr1835862plt.11.1691766383068; Fri, 11 Aug 2023 08:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691766383; cv=none; d=google.com; s=arc-20160816; b=NAL0OiZ4L3A+ghIW4EO/dWVi+kWjNoAlKAyXde47xUx/ixSYyeLJ3QD9UeBIZT1rjC IjkHWcMZKp71PHyHaAgiyl+7tEllnOGkrMm2ABOxiFAbWVJlse5Mi/0Qxo8u6dDl9sCh k/Kmysktmcb9fjUzyBa4Ffx6PabHrMIf6o/457c9G6f6sBWcaj12RNAGH4WcbTaZclUc liG3Goms8Fy4wHn+K+QTOWra/JgKxQp21bLPdPP5SV/LOxXYtK/tUsX3iwoi/IAH8ZZQ dd7XWuoIXaG1jyzUMqEjLH8wY9lp5YOcJf5UwX7uH7HylN1BPUJYhDUzytXkMtuKVJKb Fpqw== 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=KutRWmbYupaB46WSiRXPfVebMqevVbQdE0jIGHdEPN4=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=oH6dpRKkqtKabx+vVekIvk/Qd4jD6x65OcYzo+hvqhujL8ny9XdukIsF3P9Dx1ZGuE q5I6RSy7whzRwjWIYsYLOlhQjuy+zkXnAiSYB21oZMRsc9EmOL0StKAHblBWHh1GZAyy TWc/WM/Ufksj6Z++iSYYySIwpSVjvgP9Hq+VQhy+tr2HUCr57oh4KJ2SlBUIWKUMO2uv h2O+H+nbnNxCEeH22vej2o02tMnqVQMcSC1EzfkUODT+b+jKLF/WySeDg/PJyK2HWSa5 PGNurxpAQNHplSdFgbFyOV5tnM7B29+1Ftcvxz2mtaZTF5uJ+wMf9oENAAPUtEeta0Ek LLpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ieuY2SYn; 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 q15-20020a170902dacf00b001b80b061e8asi3528043plx.341.2023.08.11.08.06.09; Fri, 11 Aug 2023 08:06:23 -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=ieuY2SYn; 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 S236292AbjHKNFO (ORCPT + 99 others); Fri, 11 Aug 2023 09:05:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236356AbjHKNEy (ORCPT ); Fri, 11 Aug 2023 09:04:54 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB9AC3584; Fri, 11 Aug 2023 06:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759079; x=1723295079; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NJ+oDcj0/HsM4ftQsJN9ghcnz+v/hRDm+Rt5+H5fL6M=; b=ieuY2SYnhhUGwteyVFcuSQmpGIhpao+uxBtfENHxGnjRtu8eGx95KHNo MuDd62Eii3DGpXcpxSxtUBudTPlSVacwRMKEECLFg3KV4wWL9MVvuyGDg Lee/w3WVNc0Ip9RXYHcfAc+LWXPOm+QSXyXsc5pgeU38Un0i/31U3k7NJ SsvvENYAcGF4nziV4WYHu5Hzca9ub+ZF1DsVgHJlxFPE/nx3tgInTJY94 WqL8sQzhr89aqt6K4AjBVuCel4vHZZmyW9OcudDcBSC7YOuFGAl5h+u1b 1tuC6auRetHhHU3d1uybroFSEhlN4S3DnQJUSUm0vvBwZwVzaLaZUHkpv g==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811747" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811747" 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:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535211" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535211" 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:29 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 03/16] mmc: sdhci-brcmstb: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:38 +0300 Message-Id: <20230811130351.7038-4-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773945626558309318 X-GMAIL-MSGID: 1773945626558309318 Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that devm_clk_get_optional_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 --- drivers/mmc/host/sdhci-brcmstb.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index a2b6d8f2eeb6..c23251bb95f3 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -264,23 +264,17 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Probe found match for %s\n", match->compatible); - clk = devm_clk_get_optional(&pdev->dev, NULL); + clk = devm_clk_get_optional_enabled(&pdev->dev, NULL); if (IS_ERR(clk)) return dev_err_probe(&pdev->dev, PTR_ERR(clk), - "Failed to get clock from Device Tree\n"); - - res = clk_prepare_enable(clk); - if (res) - return res; + "Failed to get and enable clock from Device Tree\n"); memset(&brcmstb_pdata, 0, sizeof(brcmstb_pdata)); brcmstb_pdata.ops = match_priv->ops; host = sdhci_pltfm_init(pdev, &brcmstb_pdata, sizeof(struct sdhci_brcmstb_priv)); - if (IS_ERR(host)) { - res = PTR_ERR(host); - goto err_clk; - } + if (IS_ERR(host)) + return PTR_ERR(host); pltfm_host = sdhci_priv(host); priv = sdhci_pltfm_priv(pltfm_host); @@ -369,9 +363,7 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) err: sdhci_pltfm_free(pdev); -err_clk: clk_disable_unprepare(base_clk); - clk_disable_unprepare(clk); return res; } @@ -430,7 +422,7 @@ static struct platform_driver sdhci_brcmstb_driver = { .of_match_table = of_match_ptr(sdhci_brcm_of_match), }, .probe = sdhci_brcmstb_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, .shutdown = sdhci_brcmstb_shutdown, }; From patchwork Fri Aug 11 13:03:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134521 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1117808vqi; Fri, 11 Aug 2023 07:03:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrkUQu2REh6hCEw3U3yESRh8I+EjNtTmPEm/0g72Ba/3fac4qAes0L6cHiMTc9EhayY2a9 X-Received: by 2002:a17:90a:fb4c:b0:268:5bca:3bdf with SMTP id iq12-20020a17090afb4c00b002685bca3bdfmr1415845pjb.40.1691762630847; Fri, 11 Aug 2023 07:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691762630; cv=none; d=google.com; s=arc-20160816; b=a9BlESnsG6Op4SfUb7yokNe5A1d+jqlzi0pEZfn3ByyVTTTuFrReR5bm3h/L/SEim9 8uK5Q6x3YvVfPeRO9+uaQGo9JxnX2LsUMgUkGKHvrmgNSMm2XKVSdbQQ8U8K8E7v8mHb ykWPLezSp/kVWbZPGYqSbbMSnvC0DgJGeSEym74n3b29gUEJrfikqRBJdfsu7cVTDSod 4agow7HeBPeIpniHyyJpSNhJO5O8q2IuRe9Pn8yAJCoqJx+I7z4EnvHO86SPy12nNRd/ Lx2DbuD44gOtLtNBuYADpgo4KKq31gL2o6hpBJ6TPnoD7JkcFKSTVTcDOih+YQcwED+P YAQQ== 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=WHCtoGVhUI4wRIeUTNhVIg8lpspDqbfjosQEpIrTyV4=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=Q7SBmh1+7MZBDDzux6Vj6gt1r3eeeS9RFAvA3ck9NwoG4K94T3fNm6m5Vv9/u0NRbf h9ujsjzKkdIEqangnVPj6FDN6q4pwUUR4KSa5jZgZsfFhbiLk1v1jN+EOAi4S5clzcBX FGLWvq8gqguqVm3cy2bISbvXwqxDRrz40rn34z/vsnW8TSQzUs4BstMuXaLXDulsC666 WVUGUikspMnfOTe3hUj2/F98LNZtrCTYtUUe4/sX7ipG53cS+ANcSf6LVp5TxPqZYw31 Ewon45Cf26BqtsQo8n/F8XBtc54i0RLcaspzO/luBtMZTWwTTLYHvrSRQu3pt3V3sGtk bXCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B+WXmtZp; 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 y12-20020a17090aa40c00b0026b2602b969si1133190pjp.43.2023.08.11.07.03.31; Fri, 11 Aug 2023 07:03:50 -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=B+WXmtZp; 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 S232559AbjHKNFi (ORCPT + 99 others); Fri, 11 Aug 2023 09:05:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236627AbjHKNE7 (ORCPT ); Fri, 11 Aug 2023 09:04:59 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C12513A8C; Fri, 11 Aug 2023 06:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759088; x=1723295088; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=og6p3BQnbXUst3nN/+/nya1jNf4kelt5VwqtGADhToQ=; b=B+WXmtZpumRqzgcI6HZpcyMUgJRY3O6Hslh+o6FQ3i7HcFw1dHVeeDjL POe5KwrwTfi6EvC5KWQffTw0LB874PhtevxqF5ZGT6KN2kfGEJ7ojHLTh DU36Juvww4dj+Ma9x+emgoBIz3Q/1ZFTmJiW+2L6E6X747cmZrKgvvbV5 ysPvHkQMRSao3Pnwda3yWQtmNT3Phh3iKYkoGO7ArdUK9kAw+6gnzF1LT ZZXOJYKsLZnVRRzqqLdg9B810VbEefRRcuHUO6cv8qkwXK/y1Lv7gMU3n FwcgggfO3zagmG/rzMYmvcjqI/Ff2sEEqN+Izt1EBBTInvxq9kEbixfMW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811799" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811799" 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:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535218" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535218" 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:38 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/16] mmc: sdhci-cadence: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:39 +0300 Message-Id: <20230811130351.7038-5-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773941692396310323 X-GMAIL-MSGID: 1773941692396310323 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 --- drivers/mmc/host/sdhci-cadence.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index 8cdc178ec1ba..be1505e8c536 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -487,14 +487,10 @@ static int sdhci_cdns_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; static const u16 version = SDHCI_SPEC_400 << SDHCI_SPEC_VER_SHIFT; - clk = devm_clk_get(dev, NULL); + clk = devm_clk_get_enabled(dev, NULL); if (IS_ERR(clk)) return PTR_ERR(clk); - ret = clk_prepare_enable(clk); - if (ret) - return ret; - data = of_device_get_match_data(dev); if (!data) data = &sdhci_cdns_drv_data; @@ -502,10 +498,8 @@ static int sdhci_cdns_probe(struct platform_device *pdev) nr_phy_params = sdhci_cdns_phy_param_count(dev->of_node); host = sdhci_pltfm_init(pdev, &data->pltfm_data, struct_size(priv, phy_params, nr_phy_params)); - if (IS_ERR(host)) { - ret = PTR_ERR(host); - goto disable_clk; - } + if (IS_ERR(host)) + return PTR_ERR(host); pltfm_host = sdhci_priv(host); pltfm_host->clk = clk; @@ -556,9 +550,6 @@ static int sdhci_cdns_probe(struct platform_device *pdev) return 0; free: sdhci_pltfm_free(pdev); -disable_clk: - clk_disable_unprepare(clk); - return ret; } @@ -617,7 +608,7 @@ static struct platform_driver sdhci_cdns_driver = { .of_match_table = sdhci_cdns_match, }, .probe = sdhci_cdns_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_cdns_driver); From patchwork Fri Aug 11 13:03:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134548 Return-Path: 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 + 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 ); 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 To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , 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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773945516403849723 X-GMAIL-MSGID: 1773945516403849723 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 --- 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); From patchwork Fri Aug 11 13:03:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134550 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1161069vqi; Fri, 11 Aug 2023 08:07:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHHkZDpETWXUYVoW9QYY+sadn3TsVnzJpe99zTgDM8ACV4U23jYWusBF/qCfZtxdojZPtQ X-Received: by 2002:a17:902:f545:b0:1b9:e972:134d with SMTP id h5-20020a170902f54500b001b9e972134dmr1882008plf.3.1691766450892; Fri, 11 Aug 2023 08:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691766450; cv=none; d=google.com; s=arc-20160816; b=1EpxxdQEkqwmPtxGlemQ1Q1hohwL0o/Wj2z+7rkm+M6nTidjeM3HWvveg5YsY+Jz37 /V6vad7l0GpLdx8jWiw9p3R3COtlTL+1ilf83EyC2z6pXczOQFqYbOSZkC6Fl0ZqBfC0 i+D6Y17AcAVLVMDCKKktWa8NgHuPPXB9ahfIgGXAvtth3Gfs41Do814NP0HYs3yrjlAH C30t9TYXp/ootRxWkV5dQy6vKOk74o44APjrMtCRp8rOCD01BOGsRKDjMQ4LV7usT4Xz uzCqIgguvUs/CARBRe3n4ZkmHCLe7xZGp59xLVjCGDCVAR9i34/VEVV2pTKq1tnGm5Dx PwVQ== 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=CwfFSwn9k3AwRGGZFAuek5514KrUis5ExsVlVeZCYfI=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=T8o+d3Yrk1CZgYjRVSNKIf/wqPEwA6xpLwE3OBaprrvjfGuSVqL02HsR/v927sYAOy lG3j9oF8AnMkcCnTYaa5gKkznkiKe18UHyH3HQ783gasTTLsU4GVpD5MfQ4eepnyz8US q/pQfVpv6dLHXLwDIjYoSzLbxtg3aLjuiC8re9GsG4EJyMcBBe7eUxaDpcy4MSMKN3VU MANvC8r2k9dP/JH5IeKCnUOx+/bdMxYpmd7Qc8FK+X2QCn/bicDEP20IE7sx1p1e8LsK 0eXo+NtSvCI0GNJzURgs0C8e7VjIrvSYjR3txKoyVjA3ru7fjjlrYwMhf/qJwZZjN4rR zBdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VafyRfjQ; 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 lx17-20020a17090b4b1100b0026306246efdsi6127866pjb.84.2023.08.11.08.07.17; Fri, 11 Aug 2023 08:07:30 -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=VafyRfjQ; 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 S233602AbjHKNFu (ORCPT + 99 others); Fri, 11 Aug 2023 09:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236596AbjHKNFa (ORCPT ); Fri, 11 Aug 2023 09:05:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E438335A8; Fri, 11 Aug 2023 06:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759109; x=1723295109; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1In5kSRWhvZHc7zpV71cszO6jwa5BLGsLz6bC4bc1BU=; b=VafyRfjQLDI5FpTJsC6kjvpKHRlip/avsUXXk54gkvvMtMWZk+Feuyud 2ge2FbyNW6hzvEQJejnnKi17PZrH+RaShc4ozoytdWyCKFtfoL6d7iqLK aIpFvPUTviSSgm2eTUjrK1eF/PsFzEW7i7O3RP/BQJXWINNOpqGTAUxQ9 D812MKaAoe4DQO1jYvx8ZSAEJZEdf2CykpzjsB+cQHmkLlBq4mC6ET5Ed Q35aFSRWP8idFwF3S/COyL0pGKQ+3LSfRScjKW8m4w7xQ13AGBRKII/oD cwmpBQ4ElmgjiRHpPAz0D9+RqP9XdMlrz6srfWnUYjcHA8GpJzgiFKghg w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811887" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811887" 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:05:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535242" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535242" 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:55 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/16] mmc: sdhci_f_sdh30: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:41 +0300 Message-Id: <20230811130351.7038-7-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773945698050285378 X-GMAIL-MSGID: 1773945698050285378 Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci_f_sdh30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 47ae853f51aa..c58e7cb1e2a7 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -214,7 +214,7 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) struct reset_control *rst = priv->rst; struct clk *clk = priv->clk; - sdhci_pltfm_unregister(pdev); + sdhci_pltfm_remove(pdev); reset_control_assert(rst); clk_disable_unprepare(clk); From patchwork Fri Aug 11 13:03:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1112700vqi; Fri, 11 Aug 2023 06:57:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyGK2dq+x1JTnkYttLzrXN4dL0nL8E3RLXe0Rk+LeIj0U3Ba5i8xz7pdGmXFpcp5R9Fio9 X-Received: by 2002:a17:906:844e:b0:994:4f4a:218c with SMTP id e14-20020a170906844e00b009944f4a218cmr1689974ejy.8.1691762245278; Fri, 11 Aug 2023 06:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691762245; cv=none; d=google.com; s=arc-20160816; b=NWOugSG5TwrY8GyKVLwVe0es4TmVhoF6qOA8rLuTS4ywkBDSchoFYokpginS4a+0MQ A+tDIjqLz8kAvy13+dEMrubfuNJDOb4DClM9BBBTKRsi2BlpI6ugs68CQVad7dWV89qp DLZleafGYmKD1Mt7Uo75AMs2R9HDcLfA/e7/+FCJyP4vZsrArUPgjnMvvQXVGOBmnMr9 DTmccpqpaumZg9Ds2zJwrL+/rvgVWS/bVdC+klyV74M5ifCE/YIBe4nC/wjmAeVZMVQx ZxudJ7NShnSFXXH6nqcmCptW0ZUNd8jBBcAuz0ybZIh6i2JBe8Pko+6IWkNomMHq/3po U3xQ== 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=UL6CrUi/ahFX7DBMUW2nJt1Kz3NrjZimCXDv7g2AazA=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=TSZ2hsErwPakx138lVNRjV7+oDELOU+q584RJKSPog16/6XIitTqwS9KP55iqYLcNj 8I176NERtVfKn5gt55vU51AqYhvsWvgIZoaejelbtsHv2UP15r49zDbiO98FoFCK69rL Np1rQc2fxoM8N0hYNRdnJQOzDWXpIeRGQlGXVvjQZCmjrLJUdZiO4qICuAE++JbqxUtY IggMURtwVCrn/z4KlOzjC0i/E5UGznrulSgNoaUgyt2VZi1mSuy3WozZc+7wWakXTCgA JLA+3PlmrgJrqsvdqXLSX6+27ivgJDmpTt00y48hfaRj8egqAW593gWWisTBiOxKFNdX fxgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eXqzzJmA; 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 m24-20020a170906849800b009980c2658e0si3506315ejx.763.2023.08.11.06.57.00; Fri, 11 Aug 2023 06:57:25 -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=eXqzzJmA; 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 S236584AbjHKNF6 (ORCPT + 99 others); Fri, 11 Aug 2023 09:05:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236703AbjHKNFe (ORCPT ); Fri, 11 Aug 2023 09:05:34 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E41563C20; Fri, 11 Aug 2023 06:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759114; x=1723295114; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EpaGcbRZtUVPRNtweQ68G8X1R1przpLPCnn4gPSdxoU=; b=eXqzzJmA9cr48+xiYcZflU7KgQOn/OoeOrq75uX+yLGkWG3OXL3YlTxz uovhaIOxCeF5Xr3280N7d1b6UJhJOVQThNf2FXMP/iLjYp1N6g4ShKHPG v/FVjtEYnQZeA2EKtKi4OQo6DYE77ZIIm4O4+jOzEmpj6cl1Bx1plTOkT 4rvVGyHBzjWFA80PKimxevIYJ4zfYMbjJ+/bDN/5Nckp4Kc0FvNJAqago W4QURo6LNF7/fwoP+5GvO7ne+82J8cAJN4yQ0Tp8zqS6XpTk0Ih7HL7iq rs8SPXg0SR3+lKEH+WfYnFWQ277rFMoHrw5HYTp2Xd6kwH/k6YK5SEqvV w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811945" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811945" 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:05:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535251" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535251" 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:05:04 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 07/16] mmc: sdhci-iproc: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:42 +0300 Message-Id: <20230811130351.7038-8-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773941288047176765 X-GMAIL-MSGID: 1773941288047176765 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 --- drivers/mmc/host/sdhci-iproc.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index b1547bcbec32..10235fdff246 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -386,16 +386,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev) host->mmc->caps |= iproc_host->data->mmc_caps; if (dev->of_node) { - pltfm_host->clk = devm_clk_get(dev, NULL); + pltfm_host->clk = devm_clk_get_enabled(dev, NULL); if (IS_ERR(pltfm_host->clk)) { ret = PTR_ERR(pltfm_host->clk); goto err; } - ret = clk_prepare_enable(pltfm_host->clk); - if (ret) { - dev_err(dev, "failed to enable host clk\n"); - goto err; - } } if (iproc_host->data->missing_caps) { @@ -406,13 +401,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev) ret = sdhci_add_host(host); if (ret) - goto err_clk; + goto err; return 0; -err_clk: - if (dev->of_node) - clk_disable_unprepare(pltfm_host->clk); err: sdhci_pltfm_free(pdev); return ret; @@ -432,7 +424,7 @@ static struct platform_driver sdhci_iproc_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_iproc_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, .shutdown = sdhci_iproc_shutdown, }; module_platform_driver(sdhci_iproc_driver); From patchwork Fri Aug 11 13:03:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134517 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1115877vqi; Fri, 11 Aug 2023 07:01:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+54DDj5Z5tq5bKIM53hK3li2aR8cg98gk9RkdK2Hvs4EzhLqU2Bnk7+HOddBtXOkcV5cm X-Received: by 2002:a05:6a21:329a:b0:13c:9317:ad78 with SMTP id yt26-20020a056a21329a00b0013c9317ad78mr2413013pzb.46.1691762504495; Fri, 11 Aug 2023 07:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691762504; cv=none; d=google.com; s=arc-20160816; b=aDa2EXlKNCa50KmzlyBcf218B4z6I8l11xVSHJJ9dmEDuB4Uy5Q40qVyoRftAOwmWG kBlDZEBRZx6u4VvXBquv5GM72goIActPpuRZgzc1+O6qNch26hP/uLV8AMViBHPvjKr8 5TyIgE0LgsuHgslvXgHcTqqkpISqwLV4358M0MGbJeMdPDT8REJH2xCcc2xLVXy7E3Pd egt8HmeRETZhIxzZQDi0LlmX+58MXibuc7qj9lR5ZrKCWckLdsj4a76jCGBUnhiF1Os2 VOB99JUMivF1TmWt6z29CgBeD2suZfYLNYfOfxssTuTh/Qp5qk6MKv9w+RLIKw9gFtOW ZDig== 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=J6EAK6WYCzJnn2FPvDfc3M9sqrPT4Dt7si9uXsJUcag=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=iLn2paZPGGwA6VJl2LuUZhQHvJdIPERiRKLMOIwH8PBLpDlk6i0qUSJCdV8hNU3VVR 4krGSAaXq8W2aFfzYnda1fy9lpPNz6y38yRDcrLlcOkqZwknxXksl8/mBKgBw1W6R6vp 9v8DAiMT01fRRHQcTgqSWKGIZdgcZMRQ7ZvfNwHdK5zNaYc6xdwC+sgHZZrckDg5dMON of/2/Tjhit+GcJKbwPTWZHEh/B8z3HzDkDz0m5EdhL2cSIJE84CCnt2mpN8Z7Wq6fgBN QyEYUR0viZN7tC0t57RRv6vido2W3bmrJyr9+r9Y1JBq09MH7OZg1KTY2lWgtPMilVxL meqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PUesNx0r; 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 81-20020a630154000000b005639fa704c3si3423726pgb.764.2023.08.11.07.01.24; Fri, 11 Aug 2023 07:01:44 -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=PUesNx0r; 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 S236456AbjHKNG4 (ORCPT + 99 others); Fri, 11 Aug 2023 09:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235403AbjHKNGl (ORCPT ); Fri, 11 Aug 2023 09:06:41 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93F524497; Fri, 11 Aug 2023 06:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759165; x=1723295165; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Wpr+H06t2fMqc96D3gA9qTHa+iJJfudU7PaCZYhRrM=; b=PUesNx0rYr7q3Bt2Tr8hyCK7DN/52cIiO4zrY4Wm5j9GWReJFjnhGmy2 mDUL0pSyUcoOaaGEMFM2Upuu5EFAA+DiNswJkjUhHSSWm3+cWu2y3CkCH TMquO4HS81Vvh44glde7syCAkdd4Iv8GYgZcB3ExSMUaA5gAU5bZY35cv dE2nx0p0VjcNodLi7qEG/6Bbd1KO4p6IRs0lsogVMZb4vex4g+G4qEbHu B3OXoRFA5keVHcQhVymi1nB300S53d7baftwvlKHiUdGIkwGE/5NmlFR/ A4r76KfEn9+zv8jiwfBpUUrg93GXdzWIx5pN8p7SXxPkLXvuir0VzUeWh w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812144" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812144" 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:05:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535255" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535255" 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:05:12 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 08/16] mmc: sdhci-of-arasan: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:43 +0300 Message-Id: <20230811130351.7038-9-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773941559645444593 X-GMAIL-MSGID: 1773941559645444593 Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-arasan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 15025af326a2..5edd024347bd 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -2022,6 +2022,7 @@ static void sdhci_arasan_remove(struct platform_device *pdev) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host); struct clk *clk_ahb = sdhci_arasan->clk_ahb; + struct clk *clk_xin = pltfm_host->clk; if (!IS_ERR(sdhci_arasan->phy)) { if (sdhci_arasan->is_phy_on) @@ -2031,8 +2032,9 @@ static void sdhci_arasan_remove(struct platform_device *pdev) sdhci_arasan_unregister_sdclk(&pdev->dev); - sdhci_pltfm_unregister(pdev); + sdhci_pltfm_remove(pdev); + clk_disable_unprepare(clk_xin); clk_disable_unprepare(clk_ahb); } From patchwork Fri Aug 11 13:03:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134529 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1121619vqi; Fri, 11 Aug 2023 07:08:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFEgRg6U6wxxK7gYtZoYyKzstqevS2GEB/8bdTFriEfV/SoauW0PLdlWA5+p6Qc49CEUi/a X-Received: by 2002:a17:902:f543:b0:1bb:876a:abe with SMTP id h3-20020a170902f54300b001bb876a0abemr2365980plf.0.1691762893546; Fri, 11 Aug 2023 07:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691762893; cv=none; d=google.com; s=arc-20160816; b=x0JAcNJsJyE2cVQQLFLSV0PtLhC+IU4j0eNSkce5iSZGt9AV4j86HLeJgD6COe1xNG qO9LgVR69UhqfO4h1SBviifTdqnjzClWunlSKDBhuJuhfZFqL3+KFR9RDvPRrGTWYRp8 um8JWbrLsUukLrhek8pAqP+L51u03DVtpxSnQKyOg5fGIkD/vHP2TsEMmuLfxYRHiBzk N66lylu1cMwHTi7DBax2o0rVguNNk+ZQfGvezDKyAEc9TAA27oy47QtDlxHl+PZNTGhA Y+HDnYMpLaILtHPXauJR4WtE5QeH0nsWyzrujGLXk/8fqNtpJkMHAWfNDSfi4Z/BEg7z GzNg== 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=thd2H6s6DTxM26XJ2Cu4kc2kLEPMebetZTYgO1/8QKg=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=tZsbS0dXTqpEhaFCwmSGwGzlVc6VBxYz/Ca0oz959MzPWGyR1Ve+O2iWb//MkRTLSF lWdc89KlTvgZoXA9mTvhwG9KOfqesvA1E8OeK0fRt4dp91m4D3vRMZNk03W4Vkj4KQy0 3M1IibafXF6L8BnYengqyamFazNz69MfhSBxNjMBUEg7cynGGmO+XG0GojbU2GKJS4MG MiaDV1S5v4zWtfjcfIXcM2I2qHc4Uyj6qSZpl0185P1vzRAcGQPlFLn0KRNom8uZE3bB +myfAvLx04kFmDl4cWjMOy7vFSIbeU+bdJlD2SeOSlh5bXNk+Wt8+siXNY1NOQrbR/r6 7Ang== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aWSqGGIa; 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 s20-20020a170903215400b001b9c992945fsi3283540ple.555.2023.08.11.07.07.57; Fri, 11 Aug 2023 07:08:13 -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=aWSqGGIa; 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 S234215AbjHKNHN (ORCPT + 99 others); Fri, 11 Aug 2023 09:07:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233683AbjHKNGw (ORCPT ); Fri, 11 Aug 2023 09:06:52 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6585630D8; Fri, 11 Aug 2023 06:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759182; x=1723295182; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1wMuUWk+qLV1632Awen/X3G20KWSG3w5FhLYhGIunT8=; b=aWSqGGIazzIF+zKAyH2PCqzk0Bq+HSRGcB/REJrU0J+VP85wbDmvKhe4 Mp/0mIvCd5DGdST93nM/j/qETJUzRZL9sWtoNmSH37muMm34sor955Zq5 Ew7u27EgdTktE38r14Y237CERR0Jecj31nb9HbWQjDj9xVgSLUCLXbqOl VKL/7Whtp7VTklic63ISKuZAXlopawyIDLx3RUl5Xf+rLLpUNcp+AcLSb Drrdp1DvC+2lF43aw/pewKv63oDBrFbtzY0Z7bwB0VS4fjDe1w5EKfPQE xCYPvze0TThLRoOh9M0Dm5QKgN4LI6rqyeL+AI6BUcITCiKTymqK9Xxvg g==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812393" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812393" 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:05:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535264" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535264" 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:05:21 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/16] mmc: sdhci-of-at91: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:44 +0300 Message-Id: <20230811130351.7038-10-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773941968064904412 X-GMAIL-MSGID: 1773941968064904412 Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index db01ea9fa203..23a9faad2ff8 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -456,7 +456,7 @@ static void sdhci_at91_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); - sdhci_pltfm_unregister(pdev); + sdhci_pltfm_remove(pdev); clk_disable_unprepare(gck); clk_disable_unprepare(hclock); From patchwork Fri Aug 11 13:03:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134496 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1093887vqi; Fri, 11 Aug 2023 06:28:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxyZrBwz78ajJ806b3bGP26SFzpe/pb+SG6pvCbAtlayt/ZyvdeHrpPvugs9FPa4WMR4lN X-Received: by 2002:a05:6a20:4407:b0:129:c38e:cdd7 with SMTP id ce7-20020a056a20440700b00129c38ecdd7mr2386392pzb.38.1691760506160; Fri, 11 Aug 2023 06:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691760506; cv=none; d=google.com; s=arc-20160816; b=uwqyn7ot3wh2+lz7ZxSIa+pCQLwufOrmbXIp2F+WG46ID8/lj53CFzzXST0C9jaM53 G5YEmG3wXCDNMrL6InG+EhOrJj+gqOTNWEniBE4kFUD5N7SgrnlYuFtH35x8l6Kc4J9w zVcwGCfwOJ9gQSNDpOw7clUIt8aaY4ZHGvfKa/0Io+tPSNx5Oe1lYs4KzQaelNJgNM/9 H00LUhSK9R7C0TyQbFVJSjiJj8d27vzOx1DhS4BPnuDLMnnuqSmb8SrrGJbNiawnWUMg 9HCSnaW5s7PLl3ri3k+CuRC5VuTmJMKpUd+g5h2KGLX/UKYQ8TYzJtdzrP+P2w3sEKyI Xw2g== 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=LDzmi464C/uVOzryi10OmxPQ7j7LAKqZfzof/DKqhuY=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=TokEX53+j73L/b/HH4u67S19tSnFRmkcPwb4lfodx3b0WYN+1qo6MZnd7Zu2BOxg53 zDMH2aqUi898YR+jeUjYavftGl3hX/bUwqBBLDIds05wV4kp8OE9dyvYHWNisPjIbzc1 y1OqsiJYS+BdhjzJFcIXnGVevSD8uAkJ7Vhn5sI7vPu5kf3i/10MFmp2C5Ky2ppE4W2Y f2bp4Bxe/9gsMmjPOuGPgZxxT/lgWF2d6KwAmN4wAayn1iJhpbweqyJdNX5hFfR+BHeG 3RZ69OCKBKuNcj3Zl2fVGXwxCsNMx+ybhpcuar1f4QHA3NRSjJ5toix+30EhL757RZjH j78A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NOhgzVmz; 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 l13-20020a63da4d000000b0056433b221b9si3555418pgj.477.2023.08.11.06.28.12; Fri, 11 Aug 2023 06:28:26 -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=NOhgzVmz; 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 S230486AbjHKNH0 (ORCPT + 99 others); Fri, 11 Aug 2023 09:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbjHKNHG (ORCPT ); Fri, 11 Aug 2023 09:07:06 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22E0B3AA5; Fri, 11 Aug 2023 06:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759200; x=1723295200; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ld9CK0rCa3tPsrpHzxmuQkRBDumJn2j+IQr/7+g+C+4=; b=NOhgzVmzkcDHjDld3+m5Sy0Ao9iwwSNqSHCqt2TK5/8EWLSyEBY/a8V3 cSpmBMHanTm0n3TdDQTJiXmkp/S77uCzyYBcO3vJJMqQfAbEUnhvh9piy 7OY2ZpyTTbg8mI+4w37bXQBADF7qs/etamflYp+OJnKwzc5wS6affkR21 cGgjXSs00mW8802GO3XAOaJ6cAwVfTxKBwtEgM4TUVvU6x9/GN64ZS120 WTZ5nlwVixkummFv54eoBoINVP6Ny+ws5uvOCHbZpmo7CaUBel67DlhqV pXdHIveU3xgA0iI3BCzLtMAlmjGZ3d88D7qC24mDe9GMFhG7Fxadlm4x+ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812509" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812509" 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:05:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535268" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535268" 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:05:30 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 10/16] mmc: sdhci-of-esdhc: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:45 +0300 Message-Id: <20230811130351.7038-11-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773939464308855930 X-GMAIL-MSGID: 1773939464308855930 Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-esdhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 5072b59f6165..3ae9aa25745a 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -1521,7 +1521,7 @@ static struct platform_driver sdhci_esdhc_driver = { .pm = &esdhc_of_dev_pm_ops, }, .probe = sdhci_esdhc_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_esdhc_driver); From patchwork Fri Aug 11 13:03:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134545 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1152308vqi; Fri, 11 Aug 2023 07:55:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEalB7lYnNcYj4SOfTjUnITL/ujc5FkBeDuAu1ntgYPJ2WwlxiwqOHtsZjvlOLCCkVhwBYb X-Received: by 2002:a17:903:120a:b0:1b8:987f:3f34 with SMTP id l10-20020a170903120a00b001b8987f3f34mr2624492plh.25.1691765717457; Fri, 11 Aug 2023 07:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691765717; cv=none; d=google.com; s=arc-20160816; b=z9rgumE1iCKToSYUBEWvD+CgQr2JGpyi2YGbvBGL4tpCmyJDOmrfJCLfIexh+VyGLa 45EjZ3Y2k0s6fx/+NEEQSvqxYXsRJGqhG4UmsvfsSBbxacaoIBet2r8tNvAWMLYOb8Zs MpPGWx+XtxSciGyslbbVq6waUjTdzzygyYojJ9r8KQwtexWyTvOQubXXbRTsH6deM3hz jodVdOVyNlpZ4Gcg6El3VwS8qJ+yVVklRIq0MK4iFCC3nfXfNviJAQg3Bx5dDtfz9ZCR SjmHpyISlz1k0Pol3LeGBU8JpG3pTUPVvtf/FSTHvzye6/CS7WpuhIjzQBwetJ42XUaP k//A== 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=paQaUHThXGOUs1lV4wdtNAt0X4JKYNQ1Ajyr2lfLzPQ=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=FVvi/cWqQKbRcvZaMjLjpmUJGQ2S3VzJkD9jZS/dV3q9avM45HTdzQCYCZSGB6ytVG evPyN5m6+nn2s82eUKTq4MgZ5WU33qSVJAtJy5O18atMOmQ4fkybOveNU+6zVotoyQqJ HITazVDMk5Dr37/l8Kt2hBeRPkk4unndyQ4awvE7hWmNcjRnRcemzdW6xERln/XAnAVT M/NtP9toDPQU/mkotRSDLnUX78Y/Mdqk4FUhLlQuDYy6472mbXqE/43U55AJy26tnM8h ZyPXP8rCjr8LcvP5U71djDvMQYQT4YbCyCZpBTJPoweCs0+KyGcXEJN4CcLLYmesDkiK kPJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=byplEWfu; 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 m3-20020a170902d18300b001bbb33d3c3esi3310270plb.559.2023.08.11.07.55.04; Fri, 11 Aug 2023 07:55:17 -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=byplEWfu; 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 S233483AbjHKNH3 (ORCPT + 99 others); Fri, 11 Aug 2023 09:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233467AbjHKNHL (ORCPT ); Fri, 11 Aug 2023 09:07:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDE3435AE; Fri, 11 Aug 2023 06:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759204; x=1723295204; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WT3HV2tZzWIc9OTpeg8Qukvf8xDydJfY3kEvm35RQKY=; b=byplEWfuAJZSIjibi0vLvHyd/c0OmM3pu5T3HZvLz6Uo556waIQBlRLM Qre12xc/Hph0/PjouVztMQ2Qn3mop/U8GOa5FDX+xWxbScAJeDlSAn+TB KnTrUBBF4YAifLyqwwfIjGL5Ev/h5pLlP+dQj/Bf7oXgg2hq9p6BFQ4Aj MUC+fNohjJzYD/NJQCuOL074WP5H8QPqudGD8dJ53VoabXnnHgoMec6PT eQZtNNngoR6A4HN879l20f1TAbwnofwUqGbdNBnJvLoo5kbpmezp/LAQh YaPJjqZonMjeAC6MZwNU6FHw7tayaTCSeuwxfHBPDDWro1HsuDDhDghzR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812590" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812590" 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:05:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535275" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535275" 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:05:39 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 11/16] mmc: sdhci-of-hlwd: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:46 +0300 Message-Id: <20230811130351.7038-12-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773944928782366336 X-GMAIL-MSGID: 1773944928782366336 Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-hlwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index cba3ba48e9dc..06e88bb22ea5 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c @@ -85,7 +85,7 @@ static struct platform_driver sdhci_hlwd_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_hlwd_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_hlwd_driver); From patchwork Fri Aug 11 13:03:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134509 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1110674vqi; Fri, 11 Aug 2023 06:54:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFx2ikGgGBm62c5lfHYt2MlVc3o7vRUXDIZ+Y1ztgJsmGjiNuI0ed2IXArXSWxreVMM0kRi X-Received: by 2002:a17:902:e751:b0:1bc:9651:57c6 with SMTP id p17-20020a170902e75100b001bc965157c6mr2548288plf.57.1691762041225; Fri, 11 Aug 2023 06:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691762041; cv=none; d=google.com; s=arc-20160816; b=k3q5heLpxwjTo9TN0OnpBqBjtISlq+bcNPuDJdse1ekfRlyyE16Wvx0eRt12IN888S OVf0Q9m8WdXa68X9NqrYi0D14ONH42XT1wtkCMPEchWMfNPG09kj1hiioQJgbIoOzYWU Zwx1tLmsThaqrFeprIt/LIQVvtc96A/uECRPqc3cJ74int7w91c9LVfLP51fm6GWPBSV oSGKqqVqqYaiIOCTzVjcOW5WDrc/YY36wWdDsza8pl/lx2Lnrhd84Ty532i+4rzx0sZC dPU40XDvLNVubeAgMp3e2zLu1MJWpK/TKkL/02I0//cQGBZEWuRmZEPtalKRurrC8zHN Cd1Q== 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=tDoiv9P32p5mfwo+CKzjxVBvbC0oYCRTXQcnkgT1SX8=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=uQOtu+zDwvVGBquNmufCrhRM4c2l6m84W9z/zacMGxC+OHZXjSVaVdb0OG83HkTwOk huR6askAY6mL2Mej/teGlJCNNU52qENenSAzl02xLCp5ZzmuAHEEUjwjvKn6UAGUvCRh yuYzQuZxqGw0Xt+lkMgc11Hr+I3YBllQGpWEL0KZzg2dBQqqwJN06lW/mL721W5Myp56 SmHxAifkvBgZGy0KVKiia3rUCHPE6IHsLb/X1clc+FKl5PmcwFtEWq2RX18RyJhWI/7k Itc0yfvNrm1L8UROEHZ2/pAXC20vChfH0QPdtAGESFHFP7pIs/dNFID/FO/wZRd07xoV 6Tlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eeqA5VsI; 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 l7-20020a17090a850700b00267ee6ef3ccsi5439950pjn.137.2023.08.11.06.53.47; Fri, 11 Aug 2023 06:54:01 -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=eeqA5VsI; 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 S236147AbjHKNHs (ORCPT + 99 others); Fri, 11 Aug 2023 09:07:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234847AbjHKNHW (ORCPT ); Fri, 11 Aug 2023 09:07:22 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 399923C22; Fri, 11 Aug 2023 06:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759214; x=1723295214; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cLITUlXAKi/BwJx9Dy+d4fQ//8DCwhp6Xa5EddapwMg=; b=eeqA5VsIccWXyx36g/1edgGK6moElEpi6MDnHWzjQWqJAyMes7lFQmZT ESzMzpsTuMLSGUFJoBwkDcrUBrFTctCXmQ8YmJ2+CIayF6e1IQEcZfXyR SoIzV41MRPnFNbU39QhMb1XYaLJdqdktuUcum/4wQuDrESbyR9mxwAzZZ qFTQBNuebe+42D7RkVsx24cL+W4oJWCgR5cvKMlChrgBN+prGWZiRoC0Q f3lAg/ywONtNTlNrRncQodNiArS8s3XyQpSPZcn+sT2kLASIAR66+WX6t w8orvtKiI07QFPfJ0wQ9l7ZmxMJOo/4sa0pJNaCUYEY7cYeLf1oVqbwIn g==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812675" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812675" 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:05:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535288" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535288" 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:05:48 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 12/16] mmc: sdhci-of-sparx5: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:47 +0300 Message-Id: <20230811130351.7038-13-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773941074148524347 X-GMAIL-MSGID: 1773941074148524347 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 --- drivers/mmc/host/sdhci-of-sparx5.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c index 653480dbe6bb..64b77e7d14cd 100644 --- a/drivers/mmc/host/sdhci-of-sparx5.c +++ b/drivers/mmc/host/sdhci-of-sparx5.c @@ -184,15 +184,12 @@ static int sdhci_sparx5_probe(struct platform_device *pdev) sdhci_sparx5 = sdhci_pltfm_priv(pltfm_host); sdhci_sparx5->host = host; - pltfm_host->clk = devm_clk_get(&pdev->dev, "core"); + pltfm_host->clk = devm_clk_get_enabled(&pdev->dev, "core"); if (IS_ERR(pltfm_host->clk)) { ret = PTR_ERR(pltfm_host->clk); - dev_err(&pdev->dev, "failed to get core clk: %d\n", ret); + dev_err(&pdev->dev, "failed to get and enable core clk: %d\n", ret); goto free_pltfm; } - ret = clk_prepare_enable(pltfm_host->clk); - if (ret) - goto free_pltfm; if (!of_property_read_u32(np, "microchip,clock-delay", &value) && (value > 0 && value <= MSHC_DLY_CC_MAX)) @@ -202,13 +199,13 @@ static int sdhci_sparx5_probe(struct platform_device *pdev) ret = mmc_of_parse(host->mmc); if (ret) - goto err_clk; + goto free_pltfm; sdhci_sparx5->cpu_ctrl = syscon_regmap_lookup_by_compatible(syscon); if (IS_ERR(sdhci_sparx5->cpu_ctrl)) { dev_err(&pdev->dev, "No CPU syscon regmap !\n"); ret = PTR_ERR(sdhci_sparx5->cpu_ctrl); - goto err_clk; + goto free_pltfm; } if (sdhci_sparx5->delay_clock >= 0) @@ -225,7 +222,7 @@ static int sdhci_sparx5_probe(struct platform_device *pdev) ret = sdhci_add_host(host); if (ret) - goto err_clk; + goto free_pltfm; /* Set AXI bus master to use un-cached access (for DMA) */ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA) && @@ -239,8 +236,6 @@ static int sdhci_sparx5_probe(struct platform_device *pdev) return ret; -err_clk: - clk_disable_unprepare(pltfm_host->clk); free_pltfm: sdhci_pltfm_free(pdev); return ret; @@ -260,7 +255,7 @@ static struct platform_driver sdhci_sparx5_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_sparx5_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_sparx5_driver); From patchwork Fri Aug 11 13:03:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134504 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1102440vqi; Fri, 11 Aug 2023 06:39:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0UL5svRd4I4YEsdDfmly/8+tLSlYBGkNuLeWTacFxoOF+muYQU6esrSd27iS9/VExUXY/ X-Received: by 2002:a17:902:ec87:b0:1bc:1e17:6d70 with SMTP id x7-20020a170902ec8700b001bc1e176d70mr2592167plg.24.1691761196778; Fri, 11 Aug 2023 06:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691761196; cv=none; d=google.com; s=arc-20160816; b=VxjG92oOtI4B6Golt6hRalZ/ea69J85vIeCNgp6AGHyrSM7x1TYotlxfOQX4vTQ2Mj v8Wkogome/UptsOObfepaCt+CwWzob+R6PjHrN5cgHCMERZOeczZ5hKB5xnpCHv2A/D2 4PPoq7rg6Ad985s4nfwlV6J09bzSqOeateSpCZJW67kUf4aFEe1bONSZsP1WBNb1jAMX 4tenTLbQdo0qNVL/OvpiHRsedvNeyYVdg2h7pUXm1mxYqKpqScwoBHFgWO7XmOQV/a0C SyNl6RAVGYO0ayQDyaQQOcPe/5StPoEiwb+zLsFPFzTei94VepSOi/I3idOZXyw6whWA V9tw== 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=KjUz0Mpz3bXvgNmlmvwHjd/szLt+02qtox2TN55IHqQ=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=w0XnzW7psyYsE+ZLlPTjkC2M2tZF9IWTYTh8fuaIN/n9bkteCQqfKFDWKw7yK1vUKd 8BzgdGb77ZmZK+uDgw9td4e9JO0rS1FLqOJUU60VIz2JP4q5oWW40MF6QcjmJ9P/dwBG /hQth64uwu8NeU01gvrSKrhaY2sYYgODshnE55+vPPyeypIu6ovlqs30gNV2+2SOT00A 51+gac4ZxNdRCvBNn1PiCOwafsxur+jY0lqKUOWMeyUlr+IZ+jvhOqSmtI4BXhj9yHBU CsErB0UO1EeEye5xkWQfql3dBVOAXI7WYvlzJJtVtKurV2DLw6UOgQIhtSmpJMfCulGi UsMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FeY+hahd; 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 b5-20020a170902d50500b001b8a2774d60si3468012plg.486.2023.08.11.06.39.42; Fri, 11 Aug 2023 06:39:56 -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=FeY+hahd; 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 S231574AbjHKNHv (ORCPT + 99 others); Fri, 11 Aug 2023 09:07:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236335AbjHKNHZ (ORCPT ); Fri, 11 Aug 2023 09:07:25 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D43894202; Fri, 11 Aug 2023 06:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759221; x=1723295221; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cELYaecOpOxwmlY9lj9HXHEoAv/KTQp9fFm7cY/4i5Y=; b=FeY+hahdjiL6EDuqj1XtV0InCN98yjkZjRTDdwXgYRwfHwQTzDXer+sy IgCZYr08U3RyIajKbKuo7zsW6nyrh1NrkV6YlpZY3rdkir6zFlzl9SHZ6 N6zfPzw3ZqepUCMCe4qZ64snArdXjsTjOhwL/tYran6OWrec2f0W5R/vw wyBx6eBxTaLJBzSdql5ki3GolPTrOKE2D3acnrfZrZP+SDM0q55bFG8ZO Imc07DSjSr5vx+vcvmpGd9Z1Ix753MZt7zJHnXFv2gaZOpjd3CLTBDPdX ytPQ4o5um4pBNch+41QNbDhlxWjvle2mmUrQzwYHZLf1LKssvL8jkmHQC A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812743" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812743" 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:06:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535330" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535330" 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:05:57 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 13/16] mmc: sdhci-pxav2: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:48 +0300 Message-Id: <20230811130351.7038-14-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773940188753335206 X-GMAIL-MSGID: 1773940188753335206 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 --- drivers/mmc/host/sdhci-pxav2.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index a0c8470e9214..b75cbea88b40 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -268,26 +268,21 @@ static int sdhci_pxav2_probe(struct platform_device *pdev) pltfm_host = sdhci_priv(host); pxav2_host = sdhci_pltfm_priv(pltfm_host); - clk = devm_clk_get(dev, "io"); - if (IS_ERR(clk) && PTR_ERR(clk) != -EPROBE_DEFER) - clk = devm_clk_get(dev, NULL); + clk = devm_clk_get_optional_enabled(dev, "io"); + if (!clk) + clk = devm_clk_get_enabled(dev, NULL); if (IS_ERR(clk)) { ret = PTR_ERR(clk); dev_err_probe(dev, ret, "failed to get io clock\n"); goto free; } pltfm_host->clk = clk; - ret = clk_prepare_enable(clk); - if (ret) { - dev_err(dev, "failed to enable io clock\n"); - goto free; - } clk_core = devm_clk_get_optional_enabled(dev, "core"); if (IS_ERR(clk_core)) { ret = PTR_ERR(clk_core); dev_err_probe(dev, ret, "failed to enable core clock\n"); - goto disable_clk; + goto free; } host->quirks = SDHCI_QUIRK_BROKEN_ADMA @@ -339,12 +334,10 @@ static int sdhci_pxav2_probe(struct platform_device *pdev) ret = sdhci_add_host(host); if (ret) - goto disable_clk; + goto free; return 0; -disable_clk: - clk_disable_unprepare(clk); free: sdhci_pltfm_free(pdev); return ret; @@ -358,7 +351,7 @@ static struct platform_driver sdhci_pxav2_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_pxav2_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_pxav2_driver); From patchwork Fri Aug 11 13:03:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134525 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1119096vqi; Fri, 11 Aug 2023 07:05:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEcGv4C+iRNkjNMOySTke47aJ/dKYO53fmoaAel+l/FPdruDUMvWwgqABqet9ZQBdQEERa5 X-Received: by 2002:a17:902:e546:b0:1bc:2c79:c6b6 with SMTP id n6-20020a170902e54600b001bc2c79c6b6mr1738059plf.28.1691762718067; Fri, 11 Aug 2023 07:05:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691762718; cv=none; d=google.com; s=arc-20160816; b=H63TKv2ITqY8r9A1KsdyY8202kl75X/D8tQZHNye8bol+RgA7X+V5SFK1VgTvMVlZl cof5o4cOvN9w11s+Qw4KHPztF9Gu4H2CycQeMzGFplLwCGGzog7Dl7TZTGKEioLLud+K J+VFOBCX6Q1mCgjKO3txSvhfzQ3IeOG7qOTspkqy/0HnhVXoyBMOjOoMtlJZTyatTaTc J1dy4R3kCnHmBlqdTw5oTGf/EzEb7VnmMEhemDLGH7XOdXvDY9f2FcSi5UdvhRoT5JH6 7gywhfGpjxN37bgTuY9/lnxSIyd2jkttfKBBQPyPY2/25zmqA8fwVfmu+TSxLK6fu7aE iK3A== 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=apzcEZHvFKengHdsmGgpO/nZzlKZkYjy6SR0vOmi/mw=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=IPyc50KHXlN9HOkbA45Myv0IxkFUTiV/DLH+E9n1QjiecT4jNUQJkyob8jfl7UEaUb CWcVYMEYO6EQbBLnAvbonv/ElVVfyClyTQghwI6zbGkIRwVlXh5zJwvs3pQIouPQ3CT8 /93dnArFXKxdcL7JRrHnOJR7aJ1Q+7DrJjgPf4OseTHMoTK2QmI4nnLfXybnc6gDpCUg 3frjEy8agomBIHu3T1vrgebO8D5pP3J9vWgAU0suzcCUqFoCaqnrZ9K9ZZ3xfS+Mz5Sa SdRFxWswVWDDsjsC3pUuh5u9L70m0aMQGYFhq3I2CtDt7f2+PkDV1QOsdlK91KIZB1uu 8t3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hheAhfNA; 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 v1-20020a170902b7c100b001b8a3a8d707si3386987plz.573.2023.08.11.07.04.59; Fri, 11 Aug 2023 07:05:18 -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=hheAhfNA; 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 S235839AbjHKNIE (ORCPT + 99 others); Fri, 11 Aug 2023 09:08:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235581AbjHKNHn (ORCPT ); Fri, 11 Aug 2023 09:07:43 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 745AA30F1; Fri, 11 Aug 2023 06:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759238; x=1723295238; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oyHZlWm1kbOR1r7fOMlVwR9HINvOVnjP/BkAeoiZa6M=; b=hheAhfNAoNHuq1jeM3xn8ggHEIF/v6n9NMIzrCyzx591fBbG0ljPxZf8 9FX0kpqeUvJCZO6dcRkjzUgQV9aH/AeQsvFRcWEMmOVCp+3iLg43TUWSw A8UNH45hP8XK9F+qXKhw4/zgCZW5Gi9TYMUXp1HWCgiToJXGVwEC1QmEj sWqpk0JgQQMYYPq17q6cdt9GIZrHaxOeDicZvB3f3HhA8X7I1nkD8kp5I /FMkna1BAbpfGzWVDcwUIO2fE8jvyHfIfgO8Nzl4PVcngXmqeqku93IMx 4w5aYGigLu703jQvFFy6KBh8grTnXmH+YdQLyM9SO8J2e+YTQPS5hg2Du g==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812815" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812815" 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:06:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535421" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535421" 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:06:06 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 14/16] mmc: sdhci-st: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:49 +0300 Message-Id: <20230811130351.7038-15-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773941783630199839 X-GMAIL-MSGID: 1773941783630199839 Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-st.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c index 14fc2c386bd3..d12532b96b51 100644 --- a/drivers/mmc/host/sdhci-st.c +++ b/drivers/mmc/host/sdhci-st.c @@ -437,10 +437,12 @@ static void sdhci_st_remove(struct platform_device *pdev) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct st_mmc_platform_data *pdata = sdhci_pltfm_priv(pltfm_host); struct reset_control *rstc = pdata->rstc; + struct clk *clk = pltfm_host->clk; - sdhci_pltfm_unregister(pdev); + sdhci_pltfm_remove(pdev); clk_disable_unprepare(pdata->icnclk); + clk_disable_unprepare(clk); reset_control_assert(rstc); } From patchwork Fri Aug 11 13:03:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134518 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1116435vqi; Fri, 11 Aug 2023 07:02:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFx2kdt1ROafrQStz98YTJyIcXYhN/OXMptDKl+pKwOWaiqtrVW5D5j05TGZwSYlfg8L3Q1 X-Received: by 2002:a17:902:f7d2:b0:1b3:b3c5:1d1f with SMTP id h18-20020a170902f7d200b001b3b3c51d1fmr1444899plw.8.1691762539802; Fri, 11 Aug 2023 07:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691762539; cv=none; d=google.com; s=arc-20160816; b=e8WJzkHqO8mvX3rViN6Ga9b0lPseSOtaptpopBOTsKo9YRdzqm5XhL500WXH1xvomU DcfcZ5kxKbxh79YTVm4qqqsS+m0keR8rF0cAfH9cSkr5Uw9izZ0/+N20ScLMDCw0iIXc i/KPt1hivYe3T6SpuY5Ta6oFcgcZtfUw8htAw/gvsnlkKfMXXGKJtQ5Jodd/qkxhjLMB +XjNHVBWHgPm1Im/7mXryy/AuByLjUMt7J8iLQvWneKHfGt1L5OLU1gElIFUHzbz3kH8 BnoHtpeiXpVGpFamAdGp7apJ8K5ed2g+88zpLtznDyXK0nL8AaYBemfKqa9gXHy9/w1Q 6teA== 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=NYVdRPZtncwsPLs1izYL0NbWocONLU1pVhzoY7RYNqI=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=Nmcyu4uJ00DPRJNRngoUeJ+GHNdVFQncupE5DtuOiYAL8SPQaUQN/kzYbB9QX9XQr9 uTEe+00Sc6AgB6MFiRzfN/QAKljI+c5r6ta9Dqcypuii5DKd++9M9HNIF52cpimVAcoB WSQvfpDVGlqN2rkmVMWDeasBESSe4c7DN9sf2CyMph+gmpNksHJfCv3ePRLwuaXg7SVZ sOK8/uvr6B8CCcj3wSoC5yLQTrFayQj4sl2IjYeQQc37H1cw0Tov3XzWEnUbM0bM8Er1 pcLsqkch13nyTqcfLf2T5mmFnq+njQ8XD97O7ecbRFA5Wtm8SE0b7i7U+gRVBz6FxAez J30Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AjpdotpH; 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 h17-20020a170902f7d100b001b8b4330585si3365764plw.510.2023.08.11.07.01.52; Fri, 11 Aug 2023 07:02:19 -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=AjpdotpH; 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 S236047AbjHKNIH (ORCPT + 99 others); Fri, 11 Aug 2023 09:08:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231745AbjHKNHq (ORCPT ); Fri, 11 Aug 2023 09:07:46 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A60830CA; Fri, 11 Aug 2023 06:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759241; x=1723295241; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4ckVZspebDlBIvx+fK25/shZbYaEVR+Q2R9lm4tMDkc=; b=AjpdotpHT6tkoYirXmgIJyAVy9pUsKAtuOYCpIDtv+Oy7pJoKAGHChq1 CcqGlmhskIolE6NaWow60Fq5Q//oYVcp44FO7tihu3TTLFKb+aVB7JKXB zibX9BuCePDZa/hxcy+p6pPq+8bC7e2d3vTYPoWg61RAbF5eEA91dhdhJ gc4qjH67CHpF4zZ8AvLjEKfMyUVgXuwOLZs1F0frQd3AAME/uRbzOALI9 Q8oRo0dIctNYm3qWesOEyxHyIJdU0Azq+K45FY6wVaCfWi480GWf//CuH Idqhtw+PKg2/GAvZhE1XNk0BwowHY8mh6/ZuV/kQguEqdaveD1BjrHilX g==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812843" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812843" 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:06:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535514" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535514" 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:06:19 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 15/16] mmc: sdhci-pltfm: Remove sdhci_pltfm_unregister() Date: Fri, 11 Aug 2023 16:03:50 +0300 Message-Id: <20230811130351.7038-16-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773941596839712777 X-GMAIL-MSGID: 1773941596839712777 Now that sdhci_pltfm_unregister() is unused, remove it. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-pltfm.c | 12 ------------ drivers/mmc/host/sdhci-pltfm.h | 1 - 2 files changed, 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 5a63c8818987..894f3bbe2b0f 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -187,18 +187,6 @@ int sdhci_pltfm_register(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(sdhci_pltfm_register); -void sdhci_pltfm_unregister(struct platform_device *pdev) -{ - struct sdhci_host *host = platform_get_drvdata(pdev); - struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); - int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff); - - sdhci_remove_host(host, dead); - clk_disable_unprepare(pltfm_host->clk); - sdhci_pltfm_free(pdev); -} -EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); - void sdhci_pltfm_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 402f4edc6ca5..bebc450d5098 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -102,7 +102,6 @@ extern void sdhci_pltfm_free(struct platform_device *pdev); extern int sdhci_pltfm_register(struct platform_device *pdev, const struct sdhci_pltfm_data *pdata, size_t priv_size); -extern void sdhci_pltfm_unregister(struct platform_device *pdev); extern void sdhci_pltfm_remove(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host); From patchwork Fri Aug 11 13:03:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 134506 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1107311vqi; Fri, 11 Aug 2023 06:48:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXBOULDy6hx/Q013RLm8qJfkGqj48qIfPDn32nOUrWRyUA/OYry+CqYarIdQD2Y/yk7zox X-Received: by 2002:a05:6a00:b85:b0:686:24b0:554b with SMTP id g5-20020a056a000b8500b0068624b0554bmr2289134pfj.22.1691761698285; Fri, 11 Aug 2023 06:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691761698; cv=none; d=google.com; s=arc-20160816; b=u77JfgctSlG9DlSIhgyf9A6OCdOJz5usDzO8yfeCjHlKN9gEhamqW/pRAi/m99H+49 6Y6tzovspchNTb2F1o82nqTkl/pyUeBUASE2I9aXMF6M9r+Xj6ePIn8VZ0sV2K7ZEhES CNjhfXMSbtnM9Qsi6SuGzl9YDKrRZNZEdpU66DONDYYvjpWR0I4XUFTcRSVlfGfMxTsi YFzmONGz503v0xfC+pQQZbr5eFSDwB6P/IK29OU+eIvBzOhE++oJj87LPUmalSIf8P15 AR69fvbgXq9WiO7rh3ahnRBDaHYdb+Dok0EX/iiCf5uovbSGhUDBVReOuyltktjHZ2Qu ZlgA== 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=7VEzXA/athyXVCNj5/614w4D+8EB+duF4ui4V4deQ5o=; fh=1illQt2rvZm/duIamif60BE+Ziytl52XIUdvA193/Ac=; b=yVaLccArEHCFo9QM/NSfP/Lnr2kyZDviGcCjLL2HZHPocUHV+FiAArAmeWisi6E2KM eym57sbxmB693aPqt1qNGtw93VYrAZTAWCkaIT2v2iTodXLHDlwJV3Z+12f5zLuDi1jf xnHoJeXqa/brfCcG3ChcDOrCXrLGEHnjxy1YHDx9Zvzf+cGpo54F1dcQBs5sO97o6dk0 mAtlzt1AKVk84KpJN2qAxc99lkNcgfePrMZfRfNE9UCpxuXwVIuFVueElEhGxkmB/IvD rYoWAMPyfi2vJpXxNXmwt3PmglgloFw37HydXOowT2TwBoxjT/Glwh30DUS4Zw3xsS1t D3Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CtAZ96YJ; 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 p13-20020a056a000a0d00b00679a6ce03f6si3536334pfh.59.2023.08.11.06.48.04; Fri, 11 Aug 2023 06:48:18 -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=CtAZ96YJ; 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 S234532AbjHKNIP (ORCPT + 99 others); Fri, 11 Aug 2023 09:08:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236180AbjHKNHt (ORCPT ); Fri, 11 Aug 2023 09:07:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 461A83594; Fri, 11 Aug 2023 06:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759244; x=1723295244; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LId8a7HwDxC1IoswqQqzYbnaFhMlLbhkTHUD6bZclso=; b=CtAZ96YJ6ZPwnqpIlYLYoCrvOd3GZ14zrUECURSaP28xsi0qdXjSzGyQ v8DKz2+TJ9RQ/PMjYPeVeNA5/lLeQ/tyOGw0d7zx7ud3qXgtdBxkmVqfX /Ixqqh0UTyjkvK//booJp8MD5hZougg/X8wMUmbk0NvFp9jS1XVvRjEA3 tUGOsv6LOQ8MbjsUy/Ul+x/eE4BqrybOTuOb2rAn2JZXOtpVK2Kx0ScAu UfMCvI8gsjHqlPD+gZC/h5KaIjjpuNE2bHCUx5YP1lLIliS+UK0C6kz8Q 8b1dxh56ghsjnS4vUYEUzZu42wVhnql98cd1mjyoS2ydoSvuCKWDsMTYg w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812905" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812905" 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:06:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535540" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535540" 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:06:29 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Cc: Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Michal Simek , Eugen Hristev , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Patrice Chotard , Brian Norris , Ye Xingchen , Brad Larson , Christophe JAILLET , Sai Krishna Potthuri , Swati Agarwal , Andy Tang , Georgii Kruglov , Jiapeng Chong , Doug Brown , Li Zetao , Kunihiko Hayashi , Jassi Brar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 16/16] mmc: sdhci-pltfm: Rename sdhci_pltfm_register() Date: Fri, 11 Aug 2023 16:03:51 +0300 Message-Id: <20230811130351.7038-17-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773940714293671022 X-GMAIL-MSGID: 1773940714293671022 Now that sdhci_pltfm_unregister() has been removed, rename sdhci_pltfm_register() to sdhci_pltfm_init_and_add_host() to better reflect what it does. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-hlwd.c | 2 +- drivers/mmc/host/sdhci-pltfm.c | 8 ++++---- drivers/mmc/host/sdhci-pltfm.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 06e88bb22ea5..9c1c0ce610ef 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c @@ -68,7 +68,7 @@ static const struct sdhci_pltfm_data sdhci_hlwd_pdata = { static int sdhci_hlwd_probe(struct platform_device *pdev) { - return sdhci_pltfm_register(pdev, &sdhci_hlwd_pdata, 0); + return sdhci_pltfm_init_and_add_host(pdev, &sdhci_hlwd_pdata, 0); } static const struct of_device_id sdhci_hlwd_of_match[] = { diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 894f3bbe2b0f..a72e123a585d 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -166,9 +166,9 @@ void sdhci_pltfm_free(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(sdhci_pltfm_free); -int sdhci_pltfm_register(struct platform_device *pdev, - const struct sdhci_pltfm_data *pdata, - size_t priv_size) +int sdhci_pltfm_init_and_add_host(struct platform_device *pdev, + const struct sdhci_pltfm_data *pdata, + size_t priv_size) { struct sdhci_host *host; int ret = 0; @@ -185,7 +185,7 @@ int sdhci_pltfm_register(struct platform_device *pdev, return ret; } -EXPORT_SYMBOL_GPL(sdhci_pltfm_register); +EXPORT_SYMBOL_GPL(sdhci_pltfm_init_and_add_host); void sdhci_pltfm_remove(struct platform_device *pdev) { diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index bebc450d5098..b81d5b0fd616 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -99,9 +99,9 @@ extern struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, size_t priv_size); extern void sdhci_pltfm_free(struct platform_device *pdev); -extern int sdhci_pltfm_register(struct platform_device *pdev, - const struct sdhci_pltfm_data *pdata, - size_t priv_size); +extern int sdhci_pltfm_init_and_add_host(struct platform_device *pdev, + const struct sdhci_pltfm_data *pdata, + size_t priv_size); extern void sdhci_pltfm_remove(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host);