Message ID | 20230727070051.17778-62-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp923574vqo; Thu, 27 Jul 2023 00:42:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEyKt6aZ5ulk6wOKbQ4i38Ztz7LuA+S2O+B4HKbhgDSr6rwDCXgMF6KuFTd2Q6ZFWXGya/9 X-Received: by 2002:a17:906:10cb:b0:967:e015:f542 with SMTP id v11-20020a17090610cb00b00967e015f542mr1255862ejv.44.1690443767109; Thu, 27 Jul 2023 00:42:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443767; cv=pass; d=google.com; s=arc-20160816; b=vJraVrv/uAr3QIqShrsU3AFQo5CLnMNnJHg8verwbTEFIvIvdgTpxSNVjq/4CXBbv3 x/vK9BMODg5Syp7z2b1P5VGkSekBZq9qiB6nJVqpsCNMaYtKWds/BPTiHNrBsJiJfCXK r4Fr5t0DJFwKSuHdBhh/Ty2DI17n01oFX162cEWS4Lx+qOghud1F1GuOkulddbZKEabE 4kC/B6yeuOft3MtYDYEPlkJ7e8jMd4AOFIQvTSTE5ExdZQ7ZEzlz4p6nyn6W/+XC0plc k6ldoJgUYe20rT7x8zbQSGi7cP2ooTlrEy4QBZfXXd4mdfBe3JJD2OV7XDShqyfgkYUy 24zg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bcT8TsOkXmzzeka/1/dQjq/N2WSLPScPPwSFO+0rVvg=; fh=o0pesePd+0cJMsgvhMr2zlUwhlhITfpqTmToOl12smM=; b=YrdF9V5W9ol2AauUAAQCHkN/KftRRue9aCVFc7nFVDK3cV/yPAWMR8HLZFi/Tc5l2G 7lMooCXBDhlVyHuHQ26hOVMMnhPZM6L4OYN6FBPb55aOFv51zhWuZPVe0CVkl/2jthzv FQ58TEO3tRfmb8idzcmbSK56+n2dLLo97vUTauOINHdCYJ+C0ZYqElE5a3wN+7z3NOux fWa/houKi2UGTLTxe1IHjvh7eFuCFKI8bxkS8vHvbDNMZwdW4M2S0Thk1Z+CjPW30Jpm ajhdbvADEUz5ghuhk5NFn56bw3aQQX+JrCA0PKqn2tvV5oWKajLmb4xxnImWldtAVu8W zGrw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="p9l/2P6h"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13-20020a17090686cd00b0098dafe075ccsi643434ejy.97.2023.07.27.00.42.23; Thu, 27 Jul 2023 00:42:47 -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=@vivo.com header.s=selector2 header.b="p9l/2P6h"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233155AbjG0HJV (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233273AbjG0HIH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:08:07 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20729.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 483D949F1; Thu, 27 Jul 2023 00:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mbQQQaYStS58XllNgeQCaxdx4vROErkz53nGfYWsrEeuP1SkLjzPZbAqTJdNGa/6LIKPUii7wYhA7lr7UhoX2Bi9HnG9i0cg+re81akr0sgJ6Gf9vPLp4Zc4AQjxz/quwvPMJD7F8hw1nUCU689H71CN2lNILxVMH7AAIC4kDvrUoUplQJ9PR5EYD+TjdCy4WyY15OGVQA5ynF4AvnTo+hb+xUq38vJnl8vN1HJxtFp2hUYRbci0VWYfTf91tmmsrAkmRVxHV6U0yEU5BZJD0VTtm0j+xXksdJ9EI9PaoysXwkrfBN/yDWVIiblyxp6m/djI9ZQadPSIcAiZwrP7fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bcT8TsOkXmzzeka/1/dQjq/N2WSLPScPPwSFO+0rVvg=; b=K1fZor3LkXUrntte7wl+yZoohfAo93iDfuaTVS4Shrf/f6NM2YAjzN2tmMmb7ztJTXHPtDRYmscAPMQcw6Z1KkCaYci5R13dbKCpWxIW7/nrzQA97TxsKng4bSwbsDwT8k1WOxLSyLG8Qb23iVbGn020n/DbzGIEQYas85NKTgOiIXa7gvDyhb3P3gm/pJTFLCn0XLos913JEKp6pEXKOG62aVYXVhkvXcByxOixJdvN7LBqUwb/C7BGUDwqgVLF0xrqJjVQj8vwWMXG57Z8ZpbgFgEpz1it19+Ni9oaciZRcprg6Zu1pGmfX0kMaY9+Ofu9VYbexKfpx+QLcZd+HQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bcT8TsOkXmzzeka/1/dQjq/N2WSLPScPPwSFO+0rVvg=; b=p9l/2P6hQqbl8nYoOozhlE5vQAg1coQmP9S6mx3mu9PfXODEEXQWzuDiRRfqTJnn0qNIosRiFFTjsWGCJ+/GGA9vDSp3+isQL3HnwV9nSZ5ThEq7fM9oYlmHp6retqMnfhkFimhoFMkMi3rCLa1oMFKeGdstjc5s+CHv/iy+B/kuz347LFqV9VbfTMrGpPTGRd1iyPAzD7o6ltMRqHH46rN811xHuM5ChjqgIO5A9EM9Vqsc8pgR/Jr1z8U0KnigR9AlT495cwbnyuVg3eBXd2EfIIZrkW/7hPUEI1NnYwXSfJbhXZrRoXm8AaqCSAZEzjgV5laNOVNZ9jw/NNPbmg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:48 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b%3]) with mapi id 15.20.6631.026; Thu, 27 Jul 2023 07:02:48 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 62/62] mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove Date: Thu, 27 Jul 2023 15:00:51 +0800 Message-Id: <20230727070051.17778-62-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 81d192c5-ce8a-4ac0-694c-08db8e6f7c58 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5FrgY7idtNy3UpNTJnbmlnFtUnC9RIj5KlqNp/Gk6Zdz4G9w7TSs5xVl42TDVeCz9iKjxuECNKUMq9xd77FPNcUy1ZpOf7vDShzG0ifja2PZvOdJhtEzApi8mN30BSzIoaDa6ixwVcPxbYG4IpzTr1EW2NtEJAd2g16l3G4dgdU02YU7kvOdOhAWNuGJSb1oKdOCAuBOObFtF0wnt9CwVKj61c6f5SkZIPTbklyVzZop0jbZcDJWYBQzoKyNoDUXejTRsRKUTdr7cQNZ5Yhaxiok8yN8KtAkoer8hcNNKXAHBqQ5dhBlMMtqqIVJCRARm0VPLjnC9HWej8gkcxj41PDnKjuFZm8+bnHWuebcpxV7rmZxtEXFjjR7c9iw7bU8LhlY6ik9x0lJsjPkvMwwgKfvbq/4y1JebOU6DLMyRsCWPwv5RnPpuUSl0IA8xsmrTcA2SJE+q3M3jd6iaue3fid+FtWJf3TI0cUNB1TaOw/GebZKGPRozaIyAnIfNNWXAjzMxbXXNDxRSv1pHIrdSQLRYiPWAPvQHLabAslVpTSdOOXbk3mTAhrUu19jz1NlA8Tom09+g7Z2Hl+nxCuGmE3DV9eH1GUkt7qD4no4lk219MBFKBTp4BDT0pW8AzMh X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(366004)(136003)(39850400004)(346002)(376002)(451199021)(6666004)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(66574015)(186003)(2616005)(5660300002)(316002)(8936002)(8676002)(2906002)(41300700001)(4744005)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?tCQQ+Sy1RDixaIc3ntVAtjmux2tO?= =?utf-8?q?OXfFJsMXrW8P6qYbuC2ZCD6thZ0aWAIavjRccZVwxXBKq0+3qnTlxt1gu/FanRURk?= =?utf-8?q?aB7O0RrnLvqhZmvlGilzX98OHiRfywkulArsAGzTbgJDUSqUwcr+RwV5HQ4aMeB5T?= =?utf-8?q?9AGXrCpaCyWqP2ObTMcp0/dpj8kVjPlFKe6M/bu4GfbSj1/Yfue42Mg34/sHfVztS?= =?utf-8?q?4hVDkggdXb6HHZCnTnDz7KGIITJOmSjJ6orHiJzu/pX1Upu6/sbMp+x767jNazN0/?= =?utf-8?q?YcWrPyTpXxYtQG8wQn7Vg0iu31ZpkXZFMGKm1ke80D4lrBPFN/LtYnxRB6qp84zzj?= =?utf-8?q?KSHMvAgDIdcWKc2+9alQGOVPwr5q8yQ6fLvIoSpTfwvPFG6GC9wSOJIIZ+rOANIyO?= =?utf-8?q?SX1m5Bf4DrIGO0XYYnkIhJsNHno67VvUzs+K2Cicg/4uBMsaPZ/dnu4WLcVLiZr4O?= =?utf-8?q?0Zx24L1Xw5bHzDHdvQlHY+06PQQ1QSg6tuR+YIuJ4vlqZGFsCXI/JsEcUx5OSJnq/?= =?utf-8?q?0QlQjGvxe/ZQooz92DCjKRxQcDC7eb2yYsPktufZWQfoddhWITrrTCq7PlagyBifV?= =?utf-8?q?DT5T7wJUmJK4h9Nma/TScu0m8e2Rn3S7T4J3BOnBJBjlJeZIeHPLfSuHZf9XeHHCP?= =?utf-8?q?qsa2+XEB8yoiuxFATntpICzTN94Z2+pLeAn+dwBeepdbNYyX7/a79a8yCwRLBF/2i?= =?utf-8?q?fMezya3Jq5YCm5rTjmyblF5rH6sH2Tw5/AzRnxw4Nz2P0ugHZkmNCrCGTpjsdJdSe?= =?utf-8?q?X5u1YifDI3OGV9Pnvo2Dil9FKt47iF8zEKP2elntS5BASATNpfj1hEW+JFApkEZol?= =?utf-8?q?d7T1bWnsBY8FEBmUtPJKoRnom+dbqy1isgMaGqJEWzJvXN3uFNtQCrsglbR8v5pkN?= =?utf-8?q?CxoBJUo8oRjm22a1FA4joFX3GVpVoY8t1SvxdC3d28rttktxcIoV4HeL+GMNBPxvM?= =?utf-8?q?u/X3B3k58N1lKNu7ax+DIXNGtRlhbcA8aW00w2NwqT+yx37C2aDTiU28fAwvJ/cmj?= =?utf-8?q?DVSGGR/iHEcGpMu005eJD3ahC7+YtzL3fJSxFYUj+vHDQKQBV+WaPjmAIbCQUBnLr?= =?utf-8?q?a+vCVK+uoVVdwdB+91KJCfl8xN+z96Rpxa2WTcbrHdWrOVdChgFEvT5GIzgF8o5Kj?= =?utf-8?q?Q3dlKRgHUQr+sdoFTS/l7O5JCiLexfjCTVvo5POM6kjNcE3Kf0RdHjfLS+nRzt3pS?= =?utf-8?q?0ZkHkpq8n3RCBAXeKj72Y/zX7nKv05UfN8hW2L09NDogplr7hdyQF63GGRbNGqVWl?= =?utf-8?q?SsaYroKqSn5PXgzBpjELhxf64myLsMABRy4HXY/xZMVlII8ezr5G14hUNVmfieZxk?= =?utf-8?q?JclTJUJdorXeJEmjC2iWGdrIWt+UyvBeO2zYTPfxswfVdMbCn13Aqv18E2YFlJqf2?= =?utf-8?q?1lzHB3b5eQkUdgCZhB0l6AktzQOIP8HIL3uARxxI5el3RCkrXX1daYd+tliVtpbLr?= =?utf-8?q?c8j/Wd1bZq1tLPSRH/xP7Py4sMPlmDIqpLpmkcmUese/4ViNhlAiujqyfrHdRVHUA?= =?utf-8?q?Qwk7XTKBULpy?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81d192c5-ce8a-4ac0-694c-08db8e6f7c58 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:02:48.4011 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VWLAaOhm8nGABZ0wbkrbPqU21xQYZYZXWw/NbE1KScX8sl3XAHbBRpGaYyax5J0SJ6btho9y01iOzWnhHqbwEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772558763511006147 X-GMAIL-MSGID: 1772558763511006147 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 7 a.m. UTC
The order of function calls in sdhci_f_sdh30_remove is wrong,
let's call sdhci_pltfm_unregister first.
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 5def5c1c15bf ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/mmc/host/sdhci_f_sdh30.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Thu, Jul 27, 2023 at 03:00:51PM +0800, Yangtao Li wrote: > The order of function calls in sdhci_f_sdh30_remove is wrong, > let's call sdhci_pltfm_unregister first. > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > Fixes: 5def5c1c15bf ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm") > Signed-off-by: Yangtao Li <frank.li@vivo.com> Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> A cover letter summarizing the changes in this v3 compared to v2 would be nice. Also mentioning the base for this patch set would simplify things a bit. Best regards Uwe
On 27/07/23 10:00, Yangtao Li wrote: > The order of function calls in sdhci_f_sdh30_remove is wrong, > let's call sdhci_pltfm_unregister first. > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > Fixes: 5def5c1c15bf ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm") > Signed-off-by: Yangtao Li <frank.li@vivo.com> > --- > drivers/mmc/host/sdhci_f_sdh30.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c > index 840084ee72e6..964fa18a61a4 100644 > --- a/drivers/mmc/host/sdhci_f_sdh30.c > +++ b/drivers/mmc/host/sdhci_f_sdh30.c > @@ -211,11 +211,11 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) > struct sdhci_host *host = platform_get_drvdata(pdev); > struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); > > + sdhci_pltfm_unregister(pdev); That also frees priv > + > reset_control_assert(priv->rst); > clk_disable_unprepare(priv->clk); > clk_disable_unprepare(priv->clk_iface); > - > - sdhci_pltfm_unregister(pdev); > } > > #ifdef CONFIG_OF
On 27/07/23 16:55, Adrian Hunter wrote: > On 27/07/23 10:00, Yangtao Li wrote: >> The order of function calls in sdhci_f_sdh30_remove is wrong, >> let's call sdhci_pltfm_unregister first. >> >> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> >> Fixes: 5def5c1c15bf ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm") >> Signed-off-by: Yangtao Li <frank.li@vivo.com> >> --- >> drivers/mmc/host/sdhci_f_sdh30.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c >> index 840084ee72e6..964fa18a61a4 100644 >> --- a/drivers/mmc/host/sdhci_f_sdh30.c >> +++ b/drivers/mmc/host/sdhci_f_sdh30.c >> @@ -211,11 +211,11 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) >> struct sdhci_host *host = platform_get_drvdata(pdev); >> struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); >> >> + sdhci_pltfm_unregister(pdev); > > That also frees priv > >> + >> reset_control_assert(priv->rst); >> clk_disable_unprepare(priv->clk); >> clk_disable_unprepare(priv->clk_iface); >> - >> - sdhci_pltfm_unregister(pdev); >> } >> >> #ifdef CONFIG_OF > So it needs to end up looking something like below, right? diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 840084ee72e6..47ae853f51aa 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -210,12 +210,15 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); - - reset_control_assert(priv->rst); - clk_disable_unprepare(priv->clk); - clk_disable_unprepare(priv->clk_iface); + struct clk *clk_iface = priv->clk_iface; + struct reset_control *rst = priv->rst; + struct clk *clk = priv->clk; sdhci_pltfm_unregister(pdev); + + reset_control_assert(rst); + clk_disable_unprepare(clk); + clk_disable_unprepare(clk_iface); } #ifdef CONFIG_OF
Hello, On Thu, Aug 03, 2023 at 08:46:08AM +0300, Adrian Hunter wrote: > On 27/07/23 16:55, Adrian Hunter wrote: > >> diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c > >> index 840084ee72e6..964fa18a61a4 100644 > >> --- a/drivers/mmc/host/sdhci_f_sdh30.c > >> +++ b/drivers/mmc/host/sdhci_f_sdh30.c > >> @@ -211,11 +211,11 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) > >> struct sdhci_host *host = platform_get_drvdata(pdev); > >> struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); > >> > >> + sdhci_pltfm_unregister(pdev); > > > > That also frees priv > > > >> + > >> reset_control_assert(priv->rst); > >> clk_disable_unprepare(priv->clk); > >> clk_disable_unprepare(priv->clk_iface); > >> - > >> - sdhci_pltfm_unregister(pdev); > >> } > >> > >> #ifdef CONFIG_OF > > > > So it needs to end up looking something like below, right? > > diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c > index 840084ee72e6..47ae853f51aa 100644 > --- a/drivers/mmc/host/sdhci_f_sdh30.c > +++ b/drivers/mmc/host/sdhci_f_sdh30.c > @@ -210,12 +210,15 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) > { > struct sdhci_host *host = platform_get_drvdata(pdev); > struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); > - > - reset_control_assert(priv->rst); > - clk_disable_unprepare(priv->clk); > - clk_disable_unprepare(priv->clk_iface); > + struct clk *clk_iface = priv->clk_iface; > + struct reset_control *rst = priv->rst; > + struct clk *clk = priv->clk; > > sdhci_pltfm_unregister(pdev); > + > + reset_control_assert(rst); > + clk_disable_unprepare(clk); > + clk_disable_unprepare(clk_iface); > } Looks right to me. Best regards Uwe
diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 840084ee72e6..964fa18a61a4 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -211,11 +211,11 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); + sdhci_pltfm_unregister(pdev); + reset_control_assert(priv->rst); clk_disable_unprepare(priv->clk); clk_disable_unprepare(priv->clk_iface); - - sdhci_pltfm_unregister(pdev); } #ifdef CONFIG_OF