Message ID | 20230726040041.26267-25-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 t5csp175870vqo; Tue, 25 Jul 2023 21:49:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHaPJuV5nou2PZNDGHLMv/+iFs1TjiBurZ7vzsPzu+qllThObp/zMpb9+eqJUWUtMyQ09A9 X-Received: by 2002:a05:6402:756:b0:521:d770:4753 with SMTP id p22-20020a056402075600b00521d7704753mr540917edy.13.1690346997414; Tue, 25 Jul 2023 21:49:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346997; cv=pass; d=google.com; s=arc-20160816; b=fFZ+MIe/5xu/q3z0YP8B4aaif3ho58em3RIIgl8T7X+Xf6RpX+cqowvjL84oYAoNVc Sc3X82eRSuzWQFOpmyUN6CM892wZrLfyaceHCiwBijmOhS/JnOZA6ChLy6Pu+d89rfsP bN3zEVdR2o+zivRpJeIaGv749mXZ6jkiVNnFbLEAOZoXoC1Tyspivhtpi94e3wSPDdt4 kjR1r8r0umsT09fyO/gV9rmHvEe4fZ/sjbwtaw38LkMTZ0BHNnG2q7lIlIzoYtY+IZzY ocxcK4SIH5AM2OtfWEMTvrhCes/+20+flak54w1fv/HLukkZLKQCcdx9QDj711vovDwy 5KiQ== 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=nhm7E5b0BhQaVKkDpkGl0RYRyNYlwsawA1ZXX7nIng8=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=bwgcrL/QOxeTo+ZtUqnVRwPGeoUKEZXPfKuM7mW+K3vy+GbqGMJFdWoADZi9uDgzJA D3RWbkIJSml/DDgyS01GESM5qUKpG/1hVUSyVvvVPoUxvUs7lOAGy2Tt0oxX0+ZJKQeK JyflDrNWk/CnzdXq8TBefUneIek1aaVxtX6EcgLrrF820+PC+pPjd447GXqNuP2Amm94 TPhJdOvVZC0gUarcQ6t7/zcnjmjQal0LjolAAyNPDRyTZGp1+oMGNwbvWpzsYTPbrJjF OHPS+f8qGrwHoAzaX1eTgSchFNQhi+EKAe40M1KLerfdwabbo0j7hXQj/TlpAe52lhjd nnzQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nzKuqcDS; 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 r20-20020aa7cfd4000000b005219e374aaesi9059680edy.119.2023.07.25.21.49.33; Tue, 25 Jul 2023 21:49:57 -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=nzKuqcDS; 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 S231668AbjGZEGW (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbjGZEFa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:05:30 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0B8744B2; Tue, 25 Jul 2023 21:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8sQ6w9gfdCxpqz0OClo+a5WFJUcgJNGHuugP9N4FpwwvSAjVtECYu64kbGqajFjTiEEjvHkOs30phSHse8Xz4lEdbUjRz4d2heaxySiekGDuWgHGZMX+IMsAIzhOmKuga20Owkd43e5R9MtjgvjqRPZT3KbQeWawX8D832oMWdOmtR55bIgjLU4wEE+ZBfbR/IEJwPB1Zt0y8d/m4HQY/4xRuHxleIPE40vZKSKnBlHFoEftq5TCIZKAObvRMCQX1fUac/OXO4Ind/BOJAI51E8fC1mgj1GvRmtziqMgIaIt9ts3hp2NUd9wQZoOmF3SXPdQt0AHy/y4S1z48webw== 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=nhm7E5b0BhQaVKkDpkGl0RYRyNYlwsawA1ZXX7nIng8=; b=dn3yjxBb0pf3F2RiZQrHw8S0q4HFffAiU8r213aYAxAyYzFyH+PTUcw7D8Y+Az9KzdMJ2QvnA1aiRL3RxcZFat5ZbFgqhkgN7Kx3KK2reM6FP7IM9dEOC+AFdNoZzpZTAiQd4fqxBF4agBReuOOjUiuXOGoNEP9CXhOJ69SQtCxbtjZoo96csV5PuXBtTSSwihnm9jVD1nxOiQP6XyeHXfIco5ddg6FIDwjUO+6YQfRnNl5PTJi6O3tYqApIFD+/Dw6MGmP5hIZ3p65B2BeFcLF+JLBCUAo3AfJt0zP4MKOvhzc4q9E7JKobnQaisUT5vpTvQSNJqvOiWK7bPM13Fw== 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=nhm7E5b0BhQaVKkDpkGl0RYRyNYlwsawA1ZXX7nIng8=; b=nzKuqcDSlGq86Kvd0xyiF2LpkGKaPcvoR+8wJCgi9nDPBuavvsutmz4f60ZBh09jWeUfUin7N8kgISYeuqleKoSHxoOcoWWSgW2vGPBTXuSRXXBVoYE+JtbuVp2cebOqMy25SaEQDyocGI6E8wlbuP+2eiQNoWRDsdVru3XQvtMOfpX/mdlzE8+ilhlgttPupjQlB26qZuSgwF0+vCRsO2EkgKT7ftHz22jGcmPxKqJlDSgZKnMWYDdFMaPNbZAaPBbiFfOiU3ak14l796VFDlsTmyn0Kuz/VVWEZu7WHFVyD05LF5VLuUMRj0w41NS2W+5KBfCHwqMJ0nxeddNE9A== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:42 +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; Wed, 26 Jul 2023 04:01:41 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org> 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 v2 25/61] mmc: f-sdh30: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:05 +0800 Message-Id: <20230726040041.26267-25-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 63a1632a-d276-4db4-de02-08db8d8d0503 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0iLf6+/ENwXJ9+ap24z1s666yHwt0FRaCMjX0iAfaYQHLTLoc4UTy0pQ1bvHtgHH2XtHALvsgB5HNVJnbplUikUTuNtDq9gTD8EW8V1iDWfVDudt/Smh+oJ3B0EsQ3SKuMSoDTX7Yt0PwYZPiRP0Cm6BjnBDKsv5FpKwbVhQpOG0Wh6NWwBq5JyEup51QrSI/gvn/qkLFWPRh5cO92TcYcl/HVc+sVS2K2e097/1vPohaM8H8JxWfT9WMA9ZkE5l8n4/5Ruhuyp8Ko9WZAp/TLg97aCK/HfdxlrmX0YD+k+wK+VxuKLE9WBkRNvSZOP+tXjIR8ylDxR+kpc5PZJiCWgzs9FEYVRE5RZ9F9RBKD+ahRiquIZpJaTh/vpvgn2Ep++p082Tw6paZaIx7uGGvU1ps2gXmDr7TgWYURB6i9zcxZyjltAQ6SRLLO5VVtL4rVjEefNBcROLFSWDVg3iWQ9UdqDFRHvwjyB2KtrjHtLZvR1Vyik5n0xWH6a8dKE1mKuYJFxKQ0lu8H7aatjttDJyAqkd/nwMuuUMb+bMdAD+c4d4UNzbNnv378ZY3WK+HkATlj7iGt3omLAaRiTnsqo+HHsIw97V8oPF39siVSf+BXlSjCcwZjxzdpcS+3W8 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)(376002)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xBm3eEZX2RLGoF9oMmt5hRNjgkyU?= =?utf-8?q?LAkOCceC0PpN5sqo436eEju2MwjWoyJ+rITjDts8/P9eUEfgNPNn2ex0wdkxOrzG9?= =?utf-8?q?U0Astqao9lviwP94Upm9wqQ2IE1wr20LoG9Tb3RV5XgKWw2IdR41mZRoRLKDQVthl?= =?utf-8?q?/O0SmGcSEuKq4zfuLXVs92QPmFoOAfNWsHGDBfx0wmpK4utwtieUhN/fQ9J9e0QUV?= =?utf-8?q?LB+opc8iV0aOzNKle5nxcz8hOuewe8m7jS1c7XrAslsSF0hiRE4/W3nszLXVJAPnH?= =?utf-8?q?LbiODmnPTBa8cQL4jMiJFAQxtk+E72JsCHWypNll1CsUrWJeXUOvBPPzxwB5UnQcO?= =?utf-8?q?XngjTwYDqetTHDXpJSWyqvO0ZdFLs5722YmxXAZO7O7Q3Sa4oOqdRNrJL9Uo4eLXK?= =?utf-8?q?/fku6+ss5Uv3IsMXkBeKTS5Ztk0X8wKE9djt7J98MIaFzItjoSOdULyqpcyfVg8hf?= =?utf-8?q?YKXbbhtL8qxGJPzPgKX9oaJNr+HCvXrX9IWBy0JJioLsYJ5uoPaNPQFk+hsB8F6ub?= =?utf-8?q?+iqkZjvLlCo3ZBJAxe1B7dV+qlD8OnuTE6INrLjR0RxtOaOXyHtY4qbjNCE2xNx6K?= =?utf-8?q?dAMWgVzYmfPhMYe4J1/jUG3Ac+XK5wp9qOb6mhuAsH+p3MLTAuA7TvcOPjZ7SCqvn?= =?utf-8?q?CLxTNsvuHnYE38o/+1J4l4W+0L0pabvy5eyfrAX7kVhpbVCj/BHX5Wia9zNW9E8up?= =?utf-8?q?5kfnxUkFE6tjpxrsTmhLSriNX0LedU/s4ihCr/kJhs68a1lDiIGEc5qrbJ0XWwB4K?= =?utf-8?q?3aTSMPLY+HqW53AEUkPIr30gqGqmBm1Y9zIvFHt8wwLk1bU/qNmFr/63saNtC/Jby?= =?utf-8?q?vPjfH3YqLCQauo8LaNdhDC20YriYGRBxfd+HbNqL44vphO9SInuVwGDbe2otybM/X?= =?utf-8?q?jJrdZHjgWLKO7M3p/E5k8nVrXv+GfIeyVfLn3YXYQIecyzeNWQ5GSJZgiMT3oxCJo?= =?utf-8?q?8cEpI6AYHmKWxuhQRPU3yUWu2RRctVo770bFeqfI8tjCI+PxPFg6XIIYpezf9Szrj?= =?utf-8?q?o+IG2VOzaNuIGDen49e4UtVvyEO4gHYg7+lI78Y6c9FhG4XWMgHGIUP6RzmmZvAPO?= =?utf-8?q?7bVpWDrXPZQJsWDO8iitSc6RZWdcu/1X/E7vT8lxim1vJD8SC2wEq4Ug15KnXmD8Q?= =?utf-8?q?cTkprnAfMQ9K+0/1LFCmPUsjccs3YgPDhPGMCqTxull0J1omYTZcBY9HtTd8RrmdY?= =?utf-8?q?f+I3JLGX0OpC0ukGj6PufEnpFirMu23m3xxDuib78x1jgfAn8phiuz5ck/KPBblUX?= =?utf-8?q?mrvaOFjo0ALWwSX4v2RAWEozWwnUpBeVwX8qUluOx5/mAFlIYTA5ujEcGGcW+vK5y?= =?utf-8?q?8yNNdW8JDLP2akJ8sPHqwiHbVAbsa+IW2mC6QXwbqJmnFpoxfPkKk1YQNnPedub0g?= =?utf-8?q?KxkBavwAXVHjL02Rg09n5wxyhONFHDj0eT+/EaGaosryfxd2G8DheHQ9thrUpiUQt?= =?utf-8?q?qRIRsxPrcVNfFEVDr8Hd9pmq9uObMYqKyYTXzrxdKenVpDfXwBp9Z6e69B2TVF8zd?= =?utf-8?q?qQCNTrlGJ5d8?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63a1632a-d276-4db4-de02-08db8d8d0503 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:41.8442 (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: a/PKT+6xr4DtI9tLkg4rpkIXD0hwzrEITmXGXv1wHUcR37/Woz8+YKV5s3K4QaiIebvtYZYMfLkTIl1jdHmGIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772457293207530770 X-GMAIL-MSGID: 1772457293207530770 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 4 a.m. UTC
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Yangtao Li <frank.li@vivo.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/mmc/host/sdhci_f_sdh30.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
Comments
On 26/07/23 07:00, Yangtao Li wrote: > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is (mostly) ignored > and this typically results in resource leaks. To improve here there is a > quest to make the remove callback return void. In the first step of this > quest all drivers are converted to .remove_new() which already returns > void. > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > Signed-off-by: Yangtao Li <frank.li@vivo.com> > Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Adrian Hunter <adrian.hunter@intel.com> > --- > drivers/mmc/host/sdhci_f_sdh30.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c > index b01ffb4d0973..840084ee72e6 100644 > --- a/drivers/mmc/host/sdhci_f_sdh30.c > +++ b/drivers/mmc/host/sdhci_f_sdh30.c > @@ -206,7 +206,7 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) > return ret; > } > > -static int sdhci_f_sdh30_remove(struct platform_device *pdev) > +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); > @@ -216,8 +216,6 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) > clk_disable_unprepare(priv->clk_iface); > > sdhci_pltfm_unregister(pdev); > - > - return 0; > } > > #ifdef CONFIG_OF > @@ -245,8 +243,8 @@ static struct platform_driver sdhci_f_sdh30_driver = { > .acpi_match_table = ACPI_PTR(f_sdh30_acpi_ids), > .pm = &sdhci_pltfm_pmops, > }, > - .probe = sdhci_f_sdh30_probe, > - .remove = sdhci_f_sdh30_remove, > + .probe = sdhci_f_sdh30_probe, > + .remove_new = sdhci_f_sdh30_remove, > }; > > module_platform_driver(sdhci_f_sdh30_driver);
On Wed, Jul 26, 2023 at 12:00:05PM +0800, Yangtao Li wrote: > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is (mostly) ignored > and this typically results in resource leaks. To improve here there is a > quest to make the remove callback return void. In the first step of this > quest all drivers are converted to .remove_new() which already returns > void. > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > Signed-off-by: Yangtao Li <frank.li@vivo.com> > Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- > drivers/mmc/host/sdhci_f_sdh30.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c > index b01ffb4d0973..840084ee72e6 100644 > --- a/drivers/mmc/host/sdhci_f_sdh30.c > +++ b/drivers/mmc/host/sdhci_f_sdh30.c > @@ -206,7 +206,7 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) > return ret; > } > > -static int sdhci_f_sdh30_remove(struct platform_device *pdev) > +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); > @@ -216,8 +216,6 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) > clk_disable_unprepare(priv->clk_iface); > > sdhci_pltfm_unregister(pdev); > - > - return 0; > } While looking in more detail into this series I noticed a problem in this driver. (The patch is fine, and so is my Ack.) The order of function calls in sdhci_f_sdh30_remove is wrong. It first reasserts the reset and disables clocks and only then unregisters the sdhci-host which should stay functional until sdhci_remove_host() (called by sdhci_pltfm_unregister()) completes. Best regards Uwe
diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index b01ffb4d0973..840084ee72e6 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -206,7 +206,7 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) return ret; } -static int sdhci_f_sdh30_remove(struct platform_device *pdev) +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); @@ -216,8 +216,6 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) clk_disable_unprepare(priv->clk_iface); sdhci_pltfm_unregister(pdev); - - return 0; } #ifdef CONFIG_OF @@ -245,8 +243,8 @@ static struct platform_driver sdhci_f_sdh30_driver = { .acpi_match_table = ACPI_PTR(f_sdh30_acpi_ids), .pm = &sdhci_pltfm_pmops, }, - .probe = sdhci_f_sdh30_probe, - .remove = sdhci_f_sdh30_remove, + .probe = sdhci_f_sdh30_probe, + .remove_new = sdhci_f_sdh30_remove, }; module_platform_driver(sdhci_f_sdh30_driver);