Message ID | 20230726040041.26267-34-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 t5csp189847vqo; Tue, 25 Jul 2023 22:33:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlG5VkeuL1DcJ3QLCPLybfFTwUqjOGKpgT3Vo/9c8de9wWSYQPQ2MKviXnz26ExOM+0s55hl X-Received: by 2002:a17:906:1054:b0:96f:b58e:7e21 with SMTP id j20-20020a170906105400b0096fb58e7e21mr799109ejj.52.1690349635613; Tue, 25 Jul 2023 22:33:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349635; cv=pass; d=google.com; s=arc-20160816; b=LJixZ6+DS4zyrjw8Yhc7hiV3k4GK5vo4h3d6eBv5QFsRghPsemQVWHqFfPwDoITH8G 51KQ1Wn55XotrgH+9VBxeiUnBIA9VTPTZ90WXWmtT7FwgRaMyuPKVp0E0XxJ3dMNc08b D9NhQ3TTdzhpXB+JTsOr10jGfLuKNZF6bTyi1FDV6wM0O8wQSAvwR2RZp6Ec+bW0byYs yNLKTu2nOwEFiu+69txI7MerVSdf4GPhAZM8tjC0iRhjxMHWCLp0jOLh624bX3gUYbSL cidKrbhzQdqOnZrLHVitVsG40FXbwEI3u2Uoitk/MuujH6r3Tkk/KLIBu8b4QOt6XpNo Jhbw== 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=SL+uaG/CbNsLa0Cs8xtMQR2BILGVMnWVziKyhMdPUBs=; fh=Jptc+LQTdIbOXFIkBDUB9YnZRWZjO2vsWVpX7sYkr2M=; b=f3S7TuH3ybQTJwrqWbYxmo+CrAmNWknsfw4EOofB5oqa5Rwa45BMlScGA312E4fC36 Tp1Lq9OHzL+3XGSIE9tABUwdYWF67A54WDgIqHwBAcxMyeKINO0ofJYDv2WX5vTDIyhi m1PsPB71gn6vUUMIA/UuZ073YsZfFwPO4WJ/+yIqp8j76YPZv8CfU02f1j5pjaA2/x5b gEwVnoHeLhHephabe9tJaJerj0ffm+whP75lWvzRqys4APTPPv5TxXTYbGId+fOCCGcm Bb6+Su2PZCgMQ+t4LALA+II5UUxIEOx01qSd0YhAL0jIsHb5WE2R9hBiZK5ectABkYLk ZaYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=eRk9lzqK; 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 qo25-20020a170907213900b0099318060d50si8897446ejb.463.2023.07.25.22.33.32; Tue, 25 Jul 2023 22:33:55 -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=eRk9lzqK; 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 S231314AbjGZEG5 (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:06:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231484AbjGZEGL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:06:11 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2133.outbound.protection.outlook.com [40.107.215.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C53D3584; Tue, 25 Jul 2023 21:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fRcr6GvyI6r+N4RtqYBgSteXfAGzVARxUlOMDpoYzNe+xPI7rSX3bBTE6I+s3NJYZEUctAbCSdbaFIMtvTgn+FWO9flTFwJlOh0aWixO4dYKeBMAN435bmzYhJRimVnqNoyRJfywoNO4cq2oqjmzyoFU9WAeAg0pZFUY95Kd4PvzAQh7GfIJE3BUBU6sHCjLnrhuJKcr22h/NBjdKI0k865XrfumTy4XAubMnLQEhxRC7QeYSj1wp1ttx+FN36vbIhfGxU4IKyU7pJRlrMd+4z5zmdKPKOs4vueKzGRf/jd0FMtxv8BGIX02uw06dePe9oLKUgffuhrcluqqnLjl1A== 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=SL+uaG/CbNsLa0Cs8xtMQR2BILGVMnWVziKyhMdPUBs=; b=XtfsNo9T6JbDoFwlNS2oDSYVSjtLjpWlQcWJP1uypSssT3IXmToaT3MrVt60+1NHZ9xwlnU7NgKHpaM2U+DNdNBLlJi3lEMLAa3XUG7o5f6tEjYoTp/V02uNHTmGy+Aow6rqUmqIcsJI+qJ6rgGCUVUOKpOReNCZC+f1mew/K+2bE/oP5APx71Y2J59CVTQtlwOkyRraNKv2Ss6tI+7+S961wbd/HstFYH64HzF1CQQwTFHZgDT8/zk0Hucwujz8WDGGiwI2qJi/BIJPVUBG0ITmIGPfD0Oeds05up/Ep3QoQOwlUsls/fR5xWFCgVO5RF1tFcZQGGpA3mvNjpd+/w== 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=SL+uaG/CbNsLa0Cs8xtMQR2BILGVMnWVziKyhMdPUBs=; b=eRk9lzqK/c4TbgffYiPVQ3xAMjZLkFoq3nlQ0LelWSdxzJWXvMMsvVN7R9oFjYYAj4QS7xv43bo1DhzWTZ38pvtdgSKvWEQnIvFGS2TeZzt/dSEAiNWTXc6LRMIPfbNBDP2yNsHVLhfeM/Pe8XZ2UdQ6QEuhsAtGhFgfg5nXoxamxnUISyZ+7NkqpGTzEnKaEgcaB86PuFOBYO4kh3kP1nkJW/8kkaBrAX3BNKD6JddOIcLMk7ug8aXrUjytVBdmJ1WsWH7Uvyy3HgPlJs66kBYZ6AdSfU7EIKj2MundfSa7GhRzdDtGKiMMpPcIwpSEob//I1WBjctHKC7Hb4SYbw== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:02:23 +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:02:23 +0000 From: Yangtao Li <frank.li@vivo.com> To: Andrew Jeffery <andrew@aj.id.au>, Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Joel Stanley <joel@jms.id.au> 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-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 34/61] mmc: sdhci-of-aspeed: Convert to platform remove Date: Wed, 26 Jul 2023 12:00:14 +0800 Message-Id: <20230726040041.26267-34-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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: 9543a5d9-0198-40b5-68eb-08db8d8d0e1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G8nFtWWDBxNme8NahD5mEtI8z/qWLXeyf5s5aIihpay1XlVsVhWi7LSVpHDSdaHrnJ7kT7Yk2xPz7cqANqBy/yhUaBTt1wAZS8H/M3Cild0aBWZDaVmLYxu/Ke16tRsNYbwm46CzSObAxAvQChVAiYUv72mw7TjZMzO/Y4g8MwNctTvZ+IpGBus9yB3njUv8AN1qMlb2Wg48OxJnowL8x6iaTU6Z5F9c9f7+pgK6ciSwYWVTqbZi+21nm7Ft1qJSvGB4/FZ1cuPTNGLuL/hnRUsxE8vnPih2cU5pjFF6iBzEKLg31yZPsSvx+Cywt72xLHG1bUcAnOmvCCdxAQ5X8GlGJTKNxWO+XUy/B8LVlg2IJlrBZU8CLVK1I708ZSX7UlDLJ5yPDqUc6eXz+WHT//kkYaHvEAeyxZIa8FcG4FXnZCiPMiDh/QVczqyOah9C3Unk4LeBZdpA1UUQPkkpVvL2LV1HWNa+dr7s6oA+LsILTBjKo/wlOCgp9UXZ6XUsLKnrgV9k/bLRG0Pyo/90vyTARJAV6ykEuxV0uqQ14axsKOEBykXpiypxN45HJXPXMDLoj5XQkYdAlAOqmzBonkxuJS4S90YoTegxrJo4YKgOex9N/Ej7PeEAXaLC4dlS 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?UV1J0tFF81B1ntBvMEM7D6KtZQ+L?= =?utf-8?q?8SfwJeDDl5wEobFqHxnKm6fBDYrOKbHHiVCFqE5OmNihhVpZCnNIPsegkb9C1q/nO?= =?utf-8?q?26MaZGhqr4uFYxcKMHSaZVvjKeBofzibsNwFwSYoEt8f93aUjI1q9EZEfLbWektCm?= =?utf-8?q?vOzPZNdGkP8hefPSsCTbd2ltXuND9xI7UQbeLemH7XoZATQUsx0OUFmwpGkwUeiZR?= =?utf-8?q?YY0ebX2OliTy8QhxXdxJMvCFnPkF1b4ynoWk0OzfiywIuAvBcYKZMM1mAXbPo7jhm?= =?utf-8?q?/UcUcNWZZYmYhsBEXIq3Q7DE4PNMIEVUkNjg+o911Zq/3k0Imte4kszKF2wJBdVTz?= =?utf-8?q?uJarjH2eT2+uZ64a1kLgLO8VyY9T7XGQ5xM//r2eZRz8pxVdy5gNC8LmiR2XeWq6V?= =?utf-8?q?MPu2IPpFAMyDCGkQmPejGvOI/9oQ26vQo1dhHwsxG4QmXdoycKergvR0F06hEsT33?= =?utf-8?q?DdhfjpcgCS7jZh4SB1azHV4RjN5aDn++yjppMJuREyzqfsSdEstYNxFCMNUEW8G/d?= =?utf-8?q?xl9vbC1Tkh6xiNnjhzA0VkV1n8fDhkhszrbmpGj5IV54TC2wK/xHVYjff/0aeuIQL?= =?utf-8?q?9Z6nU21+7hnmyKF8Nu1WBA3mR9YoEfA+Ypj8yVh04OzsRUE5Rkt7UkJoW/q/VRfqo?= =?utf-8?q?G8yLlGfapSnr05z3TVzTC3kjyHYAH01loE0a7lU3hxyuC4aSVqgdbnhq4jTPGbvyM?= =?utf-8?q?/6k16ug3tkx71KpSEjZYUJRrWnRAxGXNSrXp0R4lSBueagyBkhSoRQW6PsTnG+NfE?= =?utf-8?q?6rRCiweoJdWlPSBW4GkXFsgvbvbvmknC4Arp+UaZwLLzrxkSqPpTq8akS1suAH6AG?= =?utf-8?q?1Va9iCBOsvDyMz/VS0fSspcinHs/03LT89GeQodBJ/e+8AzSijnYRSN8gSH8rO179?= =?utf-8?q?99gl9Ehk0crWYBNMBBcY6N0mVqYKxnIkkoN+X/pUZ3cWMS/i2oAhBZqvcEYuvhBcx?= =?utf-8?q?wVGBkujUO/f8k5QKq2m20YlXDhfqmTXFdxa7Bno2JgaA49IggMeJMUZNpxPC+W9ZN?= =?utf-8?q?C2o2bEc74gKJwF1m8eTblDjx1ngflcfzObh1NKHCKNj4lj6LdMmpzu6GsIYivpPPx?= =?utf-8?q?6OqUtXrrsZN/+YfQoodp/kCb4pU3EF9VyCkxBuK96h7wicG/MgG/CHY+aIwh9Anvs?= =?utf-8?q?nbdcauk1RX8yWelqpuZQtQymn5DjD6FzLHeTGhU7TUCNtHDy3S1qxLGvjg0xCOm1q?= =?utf-8?q?9SOLcqrJxWKqkVoylMOEALzO6GQ7XY8viRBavjZCkTOhlJZE0MBoCQ6B1uubJepOA?= =?utf-8?q?trNCZYYZB9BRWMI/OXHYQ6dSxXk5KkimMML2KAIqRapgxbN9NP1XD3fAUJnwEwBQ9?= =?utf-8?q?C9oxtpAwi5zywZfUVT3trQZHKqSeUicwQVfW/BVuxuCqPggz5yXd4HeLrViZM3pAT?= =?utf-8?q?oG3SkH8yHw4g1/Aw+m8pjlfPcBJFAcuMPB11BU7h5VOUGt/DCb2cdnzgb6x0MZSWQ?= =?utf-8?q?gXMUOm6p7pmV4y/SkWMlP5z285enX9x1CWaQYjev1D7l2lgkEx4UV/xTTTub1ALaj?= =?utf-8?q?ujy7m0dwPkm9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9543a5d9-0198-40b5-68eb-08db8d8d0e1a 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:57.0789 (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: /Paimdoq4VWZcXlmYtKQ7daiCGmdUnYltTeKTn/2ChHOwc5G2cxg40kJpj/4an8YsV5Lr7C8L80rIK9OxHphrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 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: 1772460059808408737 X-GMAIL-MSGID: 1772460059808408737 |
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>
---
drivers/mmc/host/sdhci-of-aspeed.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 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: Adrian Hunter <adrian.hunter@intel.com> > --- > drivers/mmc/host/sdhci-of-aspeed.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c > index b4867bb4a564..42d54532cabe 100644 > --- a/drivers/mmc/host/sdhci-of-aspeed.c > +++ b/drivers/mmc/host/sdhci-of-aspeed.c > @@ -450,7 +450,7 @@ static int aspeed_sdhci_probe(struct platform_device *pdev) > return ret; > } > > -static int aspeed_sdhci_remove(struct platform_device *pdev) > +static void aspeed_sdhci_remove(struct platform_device *pdev) > { > struct sdhci_pltfm_host *pltfm_host; > struct sdhci_host *host; > @@ -463,8 +463,6 @@ static int aspeed_sdhci_remove(struct platform_device *pdev) > clk_disable_unprepare(pltfm_host->clk); > > sdhci_pltfm_free(pdev); > - > - return 0; > } > > static const struct aspeed_sdhci_pdata ast2400_sdhci_pdata = { > @@ -520,7 +518,7 @@ static struct platform_driver aspeed_sdhci_driver = { > .of_match_table = aspeed_sdhci_of_match, > }, > .probe = aspeed_sdhci_probe, > - .remove = aspeed_sdhci_remove, > + .remove_new = aspeed_sdhci_remove, > }; > > static int aspeed_sdc_probe(struct platform_device *pdev) > @@ -573,13 +571,11 @@ static int aspeed_sdc_probe(struct platform_device *pdev) > return ret; > } > > -static int aspeed_sdc_remove(struct platform_device *pdev) > +static void aspeed_sdc_remove(struct platform_device *pdev) > { > struct aspeed_sdc *sdc = dev_get_drvdata(&pdev->dev); > > clk_disable_unprepare(sdc->clk); > - > - return 0; > } > > static const struct of_device_id aspeed_sdc_of_match[] = { > @@ -599,7 +595,7 @@ static struct platform_driver aspeed_sdc_driver = { > .of_match_table = aspeed_sdc_of_match, > }, > .probe = aspeed_sdc_probe, > - .remove = aspeed_sdc_remove, > + .remove_new = aspeed_sdc_remove, > }; > > #if defined(CONFIG_MMC_SDHCI_OF_ASPEED_TEST)
diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index b4867bb4a564..42d54532cabe 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -450,7 +450,7 @@ static int aspeed_sdhci_probe(struct platform_device *pdev) return ret; } -static int aspeed_sdhci_remove(struct platform_device *pdev) +static void aspeed_sdhci_remove(struct platform_device *pdev) { struct sdhci_pltfm_host *pltfm_host; struct sdhci_host *host; @@ -463,8 +463,6 @@ static int aspeed_sdhci_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } static const struct aspeed_sdhci_pdata ast2400_sdhci_pdata = { @@ -520,7 +518,7 @@ static struct platform_driver aspeed_sdhci_driver = { .of_match_table = aspeed_sdhci_of_match, }, .probe = aspeed_sdhci_probe, - .remove = aspeed_sdhci_remove, + .remove_new = aspeed_sdhci_remove, }; static int aspeed_sdc_probe(struct platform_device *pdev) @@ -573,13 +571,11 @@ static int aspeed_sdc_probe(struct platform_device *pdev) return ret; } -static int aspeed_sdc_remove(struct platform_device *pdev) +static void aspeed_sdc_remove(struct platform_device *pdev) { struct aspeed_sdc *sdc = dev_get_drvdata(&pdev->dev); clk_disable_unprepare(sdc->clk); - - return 0; } static const struct of_device_id aspeed_sdc_of_match[] = { @@ -599,7 +595,7 @@ static struct platform_driver aspeed_sdc_driver = { .of_match_table = aspeed_sdc_of_match, }, .probe = aspeed_sdc_probe, - .remove = aspeed_sdc_remove, + .remove_new = aspeed_sdc_remove, }; #if defined(CONFIG_MMC_SDHCI_OF_ASPEED_TEST)