Message ID | 20230713080807.69999-1-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679142vqm; Thu, 13 Jul 2023 01:41:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlGR5NFVf6m5mtJNdMsHfqX6QTlIT22oN3CcJsNgO6HwPidiq8fOZZDafgOq5hzofF/Guv65 X-Received: by 2002:a50:ee02:0:b0:51f:c673:5f32 with SMTP id g2-20020a50ee02000000b0051fc6735f32mr1005914eds.40.1689237710447; Thu, 13 Jul 2023 01:41:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237710; cv=pass; d=google.com; s=arc-20160816; b=rjghq1ex54lKeX30yRYX7h7ql+adJTIbnT7+i/A8IGeBydD/HLqsoLOWyGrvB/YQV4 3ZHtbJdJrz40NrCuuxcvPieKoFf3bf/NjnbJA+1b1eZphNFadp448RrkURParm7KOw5Z nanI2nlqRgeZYNes64GCw+AdTPFok2BhjI8s23QZ7p5VyNN3t866qr8caX/iQtfGehR8 ql9KHLM6wlg74NaEcx8DZf/0Mo6mjokVhBKvwtedVv11m1Fjn79MZxGLbmBRSLhXik2k vYT4XeeYfq1VwZB6cme2VfRkmH70Gs60q1GIoeEp1ML9bOM84HOMg4IHV+e95u8cOWKg b8GQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0x0hkJ7rBcNQc6MBaHii9c4fVow/2SAqZ/ObTvOr/Ks=; fh=Obr7MIEUOpnq0pB6zulldJnRaWUMQlXEdPVcMkgQvIc=; b=klgbUdj3VqN76J5DO8RwqNN1bhPfiqgxx1Uu0x1JfYHZsjxf7l8/Axr1FOf4/QivvB wF9yknkpzyT2BQCw6uc4X3cO8g+rxiWDdxeR2sL5SnAKkjkFQy40YPxena5uP5N8+J5h o2ER68JBRVtvceGYb5mlD8dICd9MG/nz8ojMlA24L77IHK3weGW0lNC5ybJl9QUJBPsf N2KvnI20sUPqWhfIH6lJsXxHVT3SazL4g9fVhDr6Bop5TVfxt9LUbUxqLwlirOEtRiTo f34rqsCyc/dgh2S7nLSuugQbB+pggd80FUXiXZPz5U4KcqOpkGNf8jYXEybGqLLyRaBX 53Fg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=W19GC5vf; 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 d4-20020aa7d5c4000000b0051ddf359991si6855301eds.344.2023.07.13.01.41.26; Thu, 13 Jul 2023 01:41: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=@vivo.com header.s=selector2 header.b=W19GC5vf; 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 S234061AbjGMIKY (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233845AbjGMIJq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:09:46 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72C392736; Thu, 13 Jul 2023 01:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZv7+kMjtN201aXRChf2u5May7uxLbzY+v/dJa03El7lGMpe+juujvGSxsr7D4mFBoWbyuGPVQhOqByMLFpjXUKyOWJHqMQkisxd/aaR0F7LY7qleTDQgipy2S2XZF5QiiCZ+V0TwZZy+B7Cw8Z22huIx97MIub6Ne+UYiuMOQ1tQHZs+T2qFFMd0fru+6RsQZ0wX5i/UUmSpde8xirJtOsIRvZ7bLWH2GWWPqTlYyjrv4fnwgpqnARNeZyFV7O675h5eEMWoEURYLm+IuSou8FZz+tGjFe1YqA7P+jOJZC6E6VhGdSr09gWu6cJ5ApwvF3na7zuKveD1mCZXXlUsQ== 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=0x0hkJ7rBcNQc6MBaHii9c4fVow/2SAqZ/ObTvOr/Ks=; b=JuOUJzM98B63erEgVTmqpkt+alJYrgRJ4lr3I7+nkgR+hGuleB7ZW2HEoE+1wDMiOTdltCfBGeARpBIaGJXeFYRoDjvuq8B9oBEx9/gE9f1YIKQjZG+gcCqh4ZnSkKsfZqn+rKbaOL26adeI6JwTD0YOh2Qb0brwUpOTFMuTvS+e28zzJivzJe0Qj6QnDAy03ppT30OGC63/HxkpgzYNKObwP6JLcyd+1IcJ7aZazqoDvLyIzbulvg30nWlhIGCVrS3N7vqPwjICaiGjwrFyCRWmztuaKBngvmjA3+S/ca+yUAPvDttaChtgJS9/oy+cFLoss8jElWVySrTK5WDvnw== 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=0x0hkJ7rBcNQc6MBaHii9c4fVow/2SAqZ/ObTvOr/Ks=; b=W19GC5vf6MitdKMn0/oQ2UAeyHy8NHvlE4HHcP3b5KYUHUKIrt9sPx0j20gPTqM9knzX2ddonO6Z3ZW9oA90BdFQbzls40jQswWjPgb/2gdc8+OiS4Ap/oywHkG6xfSKV/ZVg+OJQ0hPJJTmTGlumanowQ1hLBbhQAZHTj9xuj3GVSI3r+k2esXEs498AP7Stnf4ej41y7NpK0V52Zi38Q6arjgLglrhvXygx0EBL1Q6uVwtR2tpFZBx9Hb84f0uxYXGYU4rMBZ4PCun7lBosdFQUsK6K8JNXsXSUeGauzjdyx6AaEUV27tbB4dEh3kPQETCL8htykoKL7xdzl+BHA== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:08:22 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:08:21 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.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-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:10 +0800 Message-Id: <20230713080807.69999-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: db512120-bfe8-4c39-1183-08db83785293 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4UKwO+dP6G2m8w5g3hTGmJPt/aV3i33bHH0XyWvUwk4zTTNA7eOcf3V8XJYlRhFWWXyVgcxyYsiSmE9lwmCA2l3zgCUx2eTOdIk0sNpsiwDsMGOtNYDyCifcTieZuKxVcqrGxo6gv0lp8lwifw5yp/c71md8lw682CJg/7Xolvh6q19VySjmEv3Xt6nIFo0oaTYqB0fk+npsmdo40XKViB5E7l461rRUJXt91EFBUgEywCtIDiT8X4Nt7srUue0SxdrIkLUQirui+AeHEMol5xg8a1aJC22kYNbSpLBsKM9GfY9Af01mNdLDhB5EAcIYhpw8Mzmz4Vcv+499IIn/flipxNMPbkzGqorCNDq7hzENDCvj4tYVnUJZVZlpkfKyxeEXIugx20bh/9arc5Gkvc9hlyq6bQ2ueT+BVOPjnGw0GpXjP18jv5z7lDvr3f6IcFrfF7EOxvxmH+gLlWWHBYhabDsrxL0l8jUl3fyraszRm0mTvKOyjkbAw/HYl1u82KyqIju70iyg11/NQ1lXimdru1JwwiEAe+knPJSH6hiKy0AWbUQcfLcxfmhHmnPVnWUlg+xZ/DTuIQPJhUxkkshmggZ7H0Rc3emOonUrBsmoZOyFN6pYX6tAx532uyccGVz5rOsz6QXI+lrcxAfmLHrbqIIyYJy6hoPL2sVkwis= 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)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Y9+2t2AnQPn6xyOvEK+a3FlqKKLL?= =?utf-8?q?OB/6QBqSnW/HJQdLy0aSQvkPmyO6qWLjB3CWYjJmXEjJYq5LrjFXpOUxqPLvJOrPE?= =?utf-8?q?5QpyDxjt1fRXm8VPEAc1X9RGj9AfdCPae5DijCu01J6Rz/IllkVWHOh7LM+IuX6as?= =?utf-8?q?lFxt+Lfegzu6vL5CX8rPtM6tGcQ1ndi3541hX79BdBrcUPGUJUVUllbC0YbJfw1KK?= =?utf-8?q?OyWOx1oHMwS6278DX7FELO5pCjNyIhdQAjS++8DRag7VTKuStsVf9wuFgxrktLOtX?= =?utf-8?q?6toqW+u1kF/w8fhE0ebHMlzoWkZNnrhiGH+kFnGfADd/0sBqXb087yAdFpb+GysS6?= =?utf-8?q?2EoLFfDJpmWWxM9h/eK2sGqc2gupU+98UphTQP67rsMbAV1a6CHhj4LO4H3jQzr2R?= =?utf-8?q?Wuz0Md8RwMUG4FIoyi3PlskD3zLm7aKblxTbwomQvsioEmIBP0P4KwU8CNKfI1PpY?= =?utf-8?q?RwMeoi2k/5t/PoUQflVjGzoPqp4frkp0Nmwi79v/ih4kMRiapxmd/YHqMq+5tjBj8?= =?utf-8?q?HPp+f/vv+Z9x/B31V8wLidND1qHnp9JsiUD+fCk4iGB+LpdIAGoo1drE9mWMP/t8t?= =?utf-8?q?Wt1sXxEiCRHgVfIxoEuBPecNjRvaZD/dOImRr5DFnUvKWDfo1tlC5Lb7g544EEhZs?= =?utf-8?q?wqwcnmRhlsjuo5KSKGn1Tm6WyxkHmcEz+tQP1BfeuEFnuYwEaTzLWe9aUIbeDRks3?= =?utf-8?q?DBnj4D7ciwts2zBrFAtJtbwXA7MsI+ct6xwPJ9ykX7UpilBq9pmkMeHPEZLI0H4ZF?= =?utf-8?q?Rg9GHAlvo8VB80gHjuaG2vHoKi2UBPPkZkAyfuVQvZREKZ9aHiCl4T9wVO1aDNgBb?= =?utf-8?q?onf6Awse43448KTKm3IwAoczW+nKLwQSKuJAkrPpQeaQduiMmewlBjn1oONKbdhBW?= =?utf-8?q?IJjKhleMNknERoJ0jDBuyrG7FtIWweRIyghE8KLjlOosNMsB6LPHlb63crv4/k3t6?= =?utf-8?q?H7phFfD2+9y81/au3KqWFxYYDEb0y9A5exrZu10WmUUjK9YXrKYUaT5WOqfkP+n/F?= =?utf-8?q?eoMthWms1NqvU8WldjnIJZlkegw3B7n6d5RccChjyL6+k+drkw/q+hKAbMYSWJrGf?= =?utf-8?q?fRcPd+mwryWE1cACFKJ8AaDaDGUO8bbfhPMZjCFgnIjeenyRQyLcd1SC5ve0hgw+M?= =?utf-8?q?ySzo1LdDKWgIvH2OMSRW4wysOetLcvoHBhVBx3itMX7ZR2m2fM6hsk/6pEjF7eAeC?= =?utf-8?q?nXGmKDxlhpXwKGQ1z4OK0oV71HN7aM0HTKQQ+cDy+r7KLeGKI2O9xcoDVCOMaj5MT?= =?utf-8?q?D2z7nhRc/kSP9TxUZgSjGJ2QGXtDsOERMUDlz4FRaqL2LnRHCm2EwQOXJT4GJcf7t?= =?utf-8?q?fpCjM9fQ0d2WJtCu3MHGeVWdMpI03JM7QzAuomvvOaeGyR1oelXHyNQ0DuCipu7wm?= =?utf-8?q?WWjFDUpYtCFe4yca666GpuaXCB08GwLseGa8VYoTooBnUOdr72O8FeqkZAPhtRdty?= =?utf-8?q?xE42dLtGT4qhVFs6QZRgSVMa5hzNLICTPgP52hFa5pd+FPfQv1OmgYQgnUcf3X492?= =?utf-8?q?aY9/53Jn5FZZ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: db512120-bfe8-4c39-1183-08db83785293 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:08:20.9951 (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: 6mBtp1KRGiq1i2IlJzhT2uRt3+oEoXmS4z1okyAKNWGwtXeQIqOqX7n4j8aZeQmfJy5t3OOFE3Vf+eAtZMNIpg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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, RCVD_IN_MSPIKE_H2,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: 1771294121411590128 X-GMAIL-MSGID: 1771294121411590128 |
Series |
[01/58] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 13, 2023, 8:07 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/sunxi-mmc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Comments
On 13-07-23, 16:08, 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> > --- > drivers/mmc/host/sdhci-spear.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c > index c79035727b20..ec6c7d8e3736 100644 > --- a/drivers/mmc/host/sdhci-spear.c > +++ b/drivers/mmc/host/sdhci-spear.c > @@ -117,7 +117,7 @@ static int sdhci_probe(struct platform_device *pdev) > return ret; > } > > -static int sdhci_remove(struct platform_device *pdev) > +static void sdhci_remove(struct platform_device *pdev) > { > struct sdhci_host *host = platform_get_drvdata(pdev); > struct spear_sdhci *sdhci = sdhci_priv(host); > @@ -131,8 +131,6 @@ static int sdhci_remove(struct platform_device *pdev) > sdhci_remove_host(host, dead); > clk_disable_unprepare(sdhci->clk); > sdhci_free_host(host); > - > - return 0; > } > > #ifdef CONFIG_PM_SLEEP > @@ -186,7 +184,7 @@ static struct platform_driver sdhci_driver = { > .of_match_table = of_match_ptr(sdhci_spear_id_table), > }, > .probe = sdhci_probe, > - .remove = sdhci_remove, > + .remove_new = sdhci_remove, > }; > > module_platform_driver(sdhci_driver); Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Dne četrtek, 13. julij 2023 ob 10:07:10 CEST je Yangtao Li napisal(a): > 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: Jernej Skrabec <jernej.skrabec@gmail.com> Best regards, Jernej > --- > drivers/mmc/host/sunxi-mmc.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c > index 69dcb8805e05..d3bd0ac99ec4 100644 > --- a/drivers/mmc/host/sunxi-mmc.c > +++ b/drivers/mmc/host/sunxi-mmc.c > @@ -1486,7 +1486,7 @@ static int sunxi_mmc_probe(struct platform_device > *pdev) return ret; > } > > -static int sunxi_mmc_remove(struct platform_device *pdev) > +static void sunxi_mmc_remove(struct platform_device *pdev) > { > struct mmc_host *mmc = platform_get_drvdata(pdev); > struct sunxi_mmc_host *host = mmc_priv(mmc); > @@ -1499,8 +1499,6 @@ static int sunxi_mmc_remove(struct platform_device > *pdev) } > dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host- >sg_dma); > mmc_free_host(mmc); > - > - return 0; > } > > #ifdef CONFIG_PM > @@ -1556,7 +1554,7 @@ static struct platform_driver sunxi_mmc_driver = { > .pm = &sunxi_mmc_pm_ops, > }, > .probe = sunxi_mmc_probe, > - .remove = sunxi_mmc_remove, > + .remove_new = sunxi_mmc_remove, > }; > module_platform_driver(sunxi_mmc_driver);
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 69dcb8805e05..d3bd0ac99ec4 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1486,7 +1486,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev) return ret; } -static int sunxi_mmc_remove(struct platform_device *pdev) +static void sunxi_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct sunxi_mmc_host *host = mmc_priv(mmc); @@ -1499,8 +1499,6 @@ static int sunxi_mmc_remove(struct platform_device *pdev) } dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM @@ -1556,7 +1554,7 @@ static struct platform_driver sunxi_mmc_driver = { .pm = &sunxi_mmc_pm_ops, }, .probe = sunxi_mmc_probe, - .remove = sunxi_mmc_remove, + .remove_new = sunxi_mmc_remove, }; module_platform_driver(sunxi_mmc_driver);