<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="font-family: inherit; font-size: inherit; color: rgb(0, 0, 0);"></div>
https://m.youtube.com/watch?v=szJv6AG0528<br>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> linux-mtd <linux-mtd-bounces@lists.infradead.org> on behalf of Uwe Kleine-König <u.kleine-koenig@pengutronix.de><br>
<b>Sent:</b> Saturday, April 8, 2023 2:53 PM<br>
<b>To:</b> Miquel Raynal <miquel.raynal@bootlin.com><br>
<b>Cc:</b> Alexandre Belloni <alexandre.belloni@bootlin.com>; Dmitry Torokhov <dmitry.torokhov@gmail.com>; Lucas Stach <dev@lynxeye.de>; Vignesh Raghavendra <vigneshr@ti.com>; Linus Walleij <linus.walleij@linaro.org>; Miaoqian Lin <linmq006@gmail.com>; Stefan
 Agner <stefan@agner.ch>; linux-mips@vger.kernel.org <linux-mips@vger.kernel.org>; Paul Cercueil <paul@crapouillou.net>; linux-tegra@vger.kernel.org <linux-tegra@vger.kernel.org>; Liang Yang <liang.yang@amlogic.com>; Naga Sureshkumar Relli <nagasure@xilinx.com>;
 Jernej Skrabec <jernej.skrabec@gmail.com>; linux-amlogic@lists.infradead.org <linux-amlogic@lists.infradead.org>; Chuanhong Guo <gch981213@gmail.com>; linux-stm32@st-md-mailman.stormreply.com <linux-stm32@st-md-mailman.stormreply.com>; Heiko Stuebner <heiko@sntech.de>;
 Marek Behún <kabel@kernel.org>; Samuel Holland <samuel@sholland.org>; Alexandre Torgue <alexandre.torgue@foss.st.com>; Kevin Hilman <khilman@baylibre.com>; linux-mediatek@lists.infradead.org <linux-mediatek@lists.infradead.org>; Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>;
 Christophe Leroy <christophe.leroy@csgroup.eu>; Jonathan Hunter <jonathanh@nvidia.com>; linux-rockchip@lists.infradead.org <linux-rockchip@lists.infradead.org>; Tudor Ambarus <tudor.ambarus@linaro.org>; Geert Uytterhoeven <geert@linux-m68k.org>; Yang Yingliang
 <yangyingliang@huawei.com>; Jack Wang <jinpu.wang@ionos.com>; Jerome Brunet <jbrunet@baylibre.com>; linux-sunxi@lists.linux.dev <linux-sunxi@lists.linux.dev>; linux-arm-msm@vger.kernel.org <linux-arm-msm@vger.kernel.org>; kernel@pengutronix.de <kernel@pengutronix.de>;
 Arnd Bergmann <arnd@arndb.de>; Manivannan Sadhasivam <mani@kernel.org>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; ye xingchen <ye.xingchen@zte.com.cn>; Vladimir Zapolskiy <vz@mleia.com>; Roger Quadros <rogerq@kernel.org>; Wang Weiyang <wangweiyang2@huawei.com>;
 Harvey Hunt <harveyhuntnexus@gmail.com>; Christophe JAILLET <christophe.jaillet@wanadoo.fr>; Matthias Brugger <matthias.bgg@gmail.com>; Han Xu <han.xu@nxp.com>; Chen-Yu Tsai <wens@csie.org>; linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>;
 AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>; Neil Armstrong <neil.armstrong@linaro.org>; Christophe Kerello <christophe.kerello@foss.st.com>; Stephen Boyd <sboyd@kernel.org>; Valentin Korenblit <vkorenblit@sequans.com>; Nicolas Ferre
 <nicolas.ferre@microchip.com>; linux-renesas-soc@vger.kernel.org <linux-renesas-soc@vger.kernel.org>; Kyungmin Park <kyungmin.park@samsung.com>; Thierry Reding <thierry.reding@gmail.com>; Maxime Coquelin <mcoquelin.stm32@gmail.com>; Richard Weinberger <richard@nod.at>;
 linux-mtd@lists.infradead.org <linux-mtd@lists.infradead.org>; linux-oxnas@groups.io <linux-oxnas@groups.io>; Pali Rohár <pali@kernel.org>; Claudiu Beznea <claudiu.beznea@microchip.com><br>
<b>Subject:</b> [PATCH] mtd: nand: Convert to platform remove callback returning void</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">The .remove() callback for a platform driver returns an int which makes<br>
many driver authors wrongly assume it's possible to do error handling by<br>
returning an error code. However the value returned is (mostly) ignored<br>
and this typically results in resource leaks. To improve here there is a<br>
quest to make the remove callback return void. In the first step of this<br>
quest all drivers are converted to .remove_new() which already returns<br>
void.<br>
<br>
Trivially convert this driver from always returning zero in the remove<br>
callback to the void returning variant.<br>
<br>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com><br>
Reviewed-by: Paul Cercueil <paul@crapouillou.net><br>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org><br>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com><br>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com><br>
Acked-by: Roger Quadros <rogerq@kernel.org><br>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be><br>
Reviewed-by: Heiko Stuebner <heiko@sntech.de><br>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com><br>
Acked-by: Thierry Reding <treding@nvidia.com><br>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de><br>
---<br>
<br>
Hey Miquel,<br>
<br>
On Fri, Apr 07, 2023 at 10:10:43AM +0200, Miquel Raynal wrote:<br>
> I've looked at the different patches, they look good to me but as they<br>
> are all trivial and exactly identical, would you mind sending this<br>
> again all squashed in a single patch? A subsystem-wide conversion seems<br>
> appropriate. In all cases I plan to take this for the next merge<br>
> window.<br>
<br>
I slightly prefer them separately, because I like small patches and<br>
because the Acks and Reviews only apply to the individual drivers.<br>
But I don't mind seriously, so here comes the series squashed into one.<br>
<br>
While going through the changed, probably the s3c24xx driver (which<br>
isn't exactly identical to the other changes) could benefit from an<br>
additional change throwing out the early exit (which---I guess---cannot<br>
be hit).<br>
<br>
BTW, I constructed the lists of acks/reviews myself and found the same<br>
set. However b4 wailed about each patch claiming:<br>
<br>
            ✗ BADSIG: DKIM/infradead.org<br>
<br>
And it didn't like you producing the tags, saying:<br>
<br>
        NOTE: some trailers ignored due to from/email mismatches:<br>
            ! Trailer: Acked-by: Roger Quadros <rogerq@kernel.org><br>
             Msg From: Miquel Raynal <miquel.raynal@bootlin.com><br>
            [...]<br>
<br>
Best regards<br>
Uwe<br>
<br>
 drivers/mtd/nand/ecc-mxic.c                     | 6 ++----<br>
 drivers/mtd/nand/onenand/generic.c              | 6 ++----<br>
 drivers/mtd/nand/onenand/onenand_omap2.c        | 6 ++----<br>
 drivers/mtd/nand/onenand/onenand_samsung.c      | 6 ++----<br>
 drivers/mtd/nand/raw/ams-delta.c                | 6 ++----<br>
 drivers/mtd/nand/raw/arasan-nand-controller.c   | 6 ++----<br>
 drivers/mtd/nand/raw/atmel/nand-controller.c    | 6 ++----<br>
 drivers/mtd/nand/raw/au1550nd.c                 | 5 ++---<br>
 drivers/mtd/nand/raw/bcm47xxnflash/main.c       | 6 ++----<br>
 drivers/mtd/nand/raw/cadence-nand-controller.c  | 6 ++----<br>
 drivers/mtd/nand/raw/davinci_nand.c             | 6 ++----<br>
 drivers/mtd/nand/raw/denali_dt.c                | 6 ++----<br>
 drivers/mtd/nand/raw/fsl_elbc_nand.c            | 6 ++----<br>
 drivers/mtd/nand/raw/fsl_ifc_nand.c             | 6 ++----<br>
 drivers/mtd/nand/raw/fsl_upm.c                  | 6 ++----<br>
 drivers/mtd/nand/raw/fsmc_nand.c                | 6 ++----<br>
 drivers/mtd/nand/raw/gpio.c                     | 6 ++----<br>
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c      | 5 ++---<br>
 drivers/mtd/nand/raw/hisi504_nand.c             | 6 ++----<br>
 drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 6 ++----<br>
 drivers/mtd/nand/raw/intel-nand-controller.c    | 6 ++----<br>
 drivers/mtd/nand/raw/lpc32xx_mlc.c              | 6 ++----<br>
 drivers/mtd/nand/raw/lpc32xx_slc.c              | 6 ++----<br>
 drivers/mtd/nand/raw/marvell_nand.c             | 6 ++----<br>
 drivers/mtd/nand/raw/meson_nand.c               | 6 ++----<br>
 drivers/mtd/nand/raw/mpc5121_nfc.c              | 6 ++----<br>
 drivers/mtd/nand/raw/mtk_nand.c                 | 6 ++----<br>
 drivers/mtd/nand/raw/mxc_nand.c                 | 6 ++----<br>
 drivers/mtd/nand/raw/mxic_nand.c                | 5 ++---<br>
 drivers/mtd/nand/raw/ndfc.c                     | 6 ++----<br>
 drivers/mtd/nand/raw/omap2.c                    | 5 ++---<br>
 drivers/mtd/nand/raw/omap_elm.c                 | 5 ++---<br>
 drivers/mtd/nand/raw/orion_nand.c               | 6 ++----<br>
 drivers/mtd/nand/raw/oxnas_nand.c               | 6 ++----<br>
 drivers/mtd/nand/raw/pasemi_nand.c              | 6 ++----<br>
 drivers/mtd/nand/raw/pl35x-nand-controller.c    | 6 ++----<br>
 drivers/mtd/nand/raw/plat_nand.c                | 6 ++----<br>
 drivers/mtd/nand/raw/qcom_nandc.c               | 6 ++----<br>
 drivers/mtd/nand/raw/renesas-nand-controller.c  | 6 ++----<br>
 drivers/mtd/nand/raw/rockchip-nand-controller.c | 6 ++----<br>
 drivers/mtd/nand/raw/s3c2410.c                  | 8 +++-----<br>
 drivers/mtd/nand/raw/sh_flctl.c                 | 6 ++----<br>
 drivers/mtd/nand/raw/sharpsl.c                  | 6 ++----<br>
 drivers/mtd/nand/raw/socrates_nand.c            | 6 ++----<br>
 drivers/mtd/nand/raw/stm32_fmc2_nand.c          | 6 ++----<br>
 drivers/mtd/nand/raw/sunxi_nand.c               | 6 ++----<br>
 drivers/mtd/nand/raw/tegra_nand.c               | 6 ++----<br>
 drivers/mtd/nand/raw/vf610_nfc.c                | 5 ++---<br>
 drivers/mtd/nand/raw/xway_nand.c                | 6 ++----<br>
 49 files changed, 99 insertions(+), 191 deletions(-)<br>
<br>
diff --git a/drivers/mtd/nand/ecc-mxic.c b/drivers/mtd/nand/ecc-mxic.c<br>
index 8afdca731b87..915aadd1a170 100644<br>
--- a/drivers/mtd/nand/ecc-mxic.c<br>
+++ b/drivers/mtd/nand/ecc-mxic.c<br>
@@ -847,13 +847,11 @@ static int mxic_ecc_probe(struct platform_device *pdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int mxic_ecc_remove(struct platform_device *pdev)<br>
+static void mxic_ecc_remove(struct platform_device *pdev)<br>
 {<br>
         struct mxic_ecc_engine *mxic = platform_get_drvdata(pdev);<br>
 <br>
         nand_ecc_unregister_on_host_hw_engine(&mxic->external_engine);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id mxic_ecc_of_ids[] = {<br>
@@ -870,7 +868,7 @@ static struct platform_driver mxic_ecc_driver = {<br>
                 .of_match_table = mxic_ecc_of_ids,<br>
         },<br>
         .probe = mxic_ecc_probe,<br>
-       .remove = mxic_ecc_remove,<br>
+       .remove_new = mxic_ecc_remove,<br>
 };<br>
 module_platform_driver(mxic_ecc_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/onenand/generic.c b/drivers/mtd/nand/onenand/generic.c<br>
index a4b8b65fe15f..4e7de48f07a6 100644<br>
--- a/drivers/mtd/nand/onenand/generic.c<br>
+++ b/drivers/mtd/nand/onenand/generic.c<br>
@@ -85,7 +85,7 @@ static int generic_onenand_probe(struct platform_device *pdev)<br>
         return err;<br>
 }<br>
 <br>
-static int generic_onenand_remove(struct platform_device *pdev)<br>
+static void generic_onenand_remove(struct platform_device *pdev)<br>
 {<br>
         struct onenand_info *info = platform_get_drvdata(pdev);<br>
         struct resource *res = pdev->resource;<br>
@@ -97,8 +97,6 @@ static int generic_onenand_remove(struct platform_device *pdev)<br>
                 iounmap(info->onenand.base);<br>
                 kfree(info);<br>
         }<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver generic_onenand_driver = {<br>
@@ -106,7 +104,7 @@ static struct platform_driver generic_onenand_driver = {<br>
                 .name           = DRIVER_NAME,<br>
         },<br>
         .probe          = generic_onenand_probe,<br>
-       .remove         = generic_onenand_remove,<br>
+       .remove_new     = generic_onenand_remove,<br>
 };<br>
 <br>
 module_platform_driver(generic_onenand_driver);<br>
diff --git a/drivers/mtd/nand/onenand/onenand_omap2.c b/drivers/mtd/nand/onenand/onenand_omap2.c<br>
index 12825eb97938..ff7af98604df 100644<br>
--- a/drivers/mtd/nand/onenand/onenand_omap2.c<br>
+++ b/drivers/mtd/nand/onenand/onenand_omap2.c<br>
@@ -581,7 +581,7 @@ static int omap2_onenand_probe(struct platform_device *pdev)<br>
         return r;<br>
 }<br>
 <br>
-static int omap2_onenand_remove(struct platform_device *pdev)<br>
+static void omap2_onenand_remove(struct platform_device *pdev)<br>
 {<br>
         struct omap2_onenand *c = dev_get_drvdata(&pdev->dev);<br>
 <br>
@@ -589,8 +589,6 @@ static int omap2_onenand_remove(struct platform_device *pdev)<br>
         if (c->dma_chan)<br>
                 dma_release_channel(c->dma_chan);<br>
         omap2_onenand_shutdown(pdev);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id omap2_onenand_id_table[] = {<br>
@@ -601,7 +599,7 @@ MODULE_DEVICE_TABLE(of, omap2_onenand_id_table);<br>
 <br>
 static struct platform_driver omap2_onenand_driver = {<br>
         .probe          = omap2_onenand_probe,<br>
-       .remove         = omap2_onenand_remove,<br>
+       .remove_new     = omap2_onenand_remove,<br>
         .shutdown       = omap2_onenand_shutdown,<br>
         .driver         = {<br>
                 .name   = DRIVER_NAME,<br>
diff --git a/drivers/mtd/nand/onenand/onenand_samsung.c b/drivers/mtd/nand/onenand/onenand_samsung.c<br>
index b64895573515..92151aa52964 100644<br>
--- a/drivers/mtd/nand/onenand/onenand_samsung.c<br>
+++ b/drivers/mtd/nand/onenand/onenand_samsung.c<br>
@@ -943,13 +943,11 @@ static int s3c_onenand_probe(struct platform_device *pdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int s3c_onenand_remove(struct platform_device *pdev)<br>
+static void s3c_onenand_remove(struct platform_device *pdev)<br>
 {<br>
         struct mtd_info *mtd = platform_get_drvdata(pdev);<br>
 <br>
         onenand_release(mtd);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int s3c_pm_ops_suspend(struct device *dev)<br>
@@ -996,7 +994,7 @@ static struct platform_driver s3c_onenand_driver = {<br>
         },<br>
         .id_table       = s3c_onenand_driver_ids,<br>
         .probe          = s3c_onenand_probe,<br>
-       .remove         = s3c_onenand_remove,<br>
+       .remove_new     = s3c_onenand_remove,<br>
 };<br>
 <br>
 module_platform_driver(s3c_onenand_driver);<br>
diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw/ams-delta.c<br>
index 13de39aa3288..fa621ffa6490 100644<br>
--- a/drivers/mtd/nand/raw/ams-delta.c<br>
+++ b/drivers/mtd/nand/raw/ams-delta.c<br>
@@ -397,7 +397,7 @@ static int gpio_nand_probe(struct platform_device *pdev)<br>
 /*<br>
  * Clean up routine<br>
  */<br>
-static int gpio_nand_remove(struct platform_device *pdev)<br>
+static void gpio_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct gpio_nand *priv = platform_get_drvdata(pdev);<br>
         struct mtd_info *mtd = nand_to_mtd(&priv->nand_chip);<br>
@@ -410,8 +410,6 @@ static int gpio_nand_remove(struct platform_device *pdev)<br>
         ret = mtd_device_unregister(mtd);<br>
         WARN_ON(ret);<br>
         nand_cleanup(mtd_to_nand(mtd));<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 #ifdef CONFIG_OF<br>
@@ -434,7 +432,7 @@ MODULE_DEVICE_TABLE(platform, gpio_nand_plat_id_table);<br>
 <br>
 static struct platform_driver gpio_nand_driver = {<br>
         .probe          = gpio_nand_probe,<br>
-       .remove         = gpio_nand_remove,<br>
+       .remove_new     = gpio_nand_remove,<br>
         .id_table       = gpio_nand_plat_id_table,<br>
         .driver         = {<br>
                 .name   = "ams-delta-nand",<br>
diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c<br>
index ec7e6eeac55f..d513d2db3549 100644<br>
--- a/drivers/mtd/nand/raw/arasan-nand-controller.c<br>
+++ b/drivers/mtd/nand/raw/arasan-nand-controller.c<br>
@@ -1496,7 +1496,7 @@ static int anfc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int anfc_remove(struct platform_device *pdev)<br>
+static void anfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct arasan_nfc *nfc = platform_get_drvdata(pdev);<br>
 <br>
@@ -1504,8 +1504,6 @@ static int anfc_remove(struct platform_device *pdev)<br>
 <br>
         clk_disable_unprepare(nfc->bus_clk);<br>
         clk_disable_unprepare(nfc->controller_clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id anfc_ids[] = {<br>
@@ -1525,7 +1523,7 @@ static struct platform_driver anfc_driver = {<br>
                 .of_match_table = anfc_ids,<br>
         },<br>
         .probe = anfc_probe,<br>
-       .remove = anfc_remove,<br>
+       .remove_new = anfc_remove,<br>
 };<br>
 module_platform_driver(anfc_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c<br>
index 41c6bd6e2d72..81e3d682a8cd 100644<br>
--- a/drivers/mtd/nand/raw/atmel/nand-controller.c<br>
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c<br>
@@ -2626,13 +2626,11 @@ static int atmel_nand_controller_probe(struct platform_device *pdev)<br>
         return caps->ops->probe(pdev, caps);<br>
 }<br>
 <br>
-static int atmel_nand_controller_remove(struct platform_device *pdev)<br>
+static void atmel_nand_controller_remove(struct platform_device *pdev)<br>
 {<br>
         struct atmel_nand_controller *nc = platform_get_drvdata(pdev);<br>
 <br>
         WARN_ON(nc->caps->ops->remove(nc));<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static __maybe_unused int atmel_nand_controller_resume(struct device *dev)<br>
@@ -2663,7 +2661,7 @@ static struct platform_driver atmel_nand_controller_driver = {<br>
                 .pm = &atmel_nand_controller_pm_ops,<br>
         },<br>
         .probe = atmel_nand_controller_probe,<br>
-       .remove = atmel_nand_controller_remove,<br>
+       .remove_new = atmel_nand_controller_remove,<br>
 };<br>
 module_platform_driver(atmel_nand_controller_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/au1550nd.c b/drivers/mtd/nand/raw/au1550nd.c<br>
index 5aa3a06d740c..063a5e0b8d4b 100644<br>
--- a/drivers/mtd/nand/raw/au1550nd.c<br>
+++ b/drivers/mtd/nand/raw/au1550nd.c<br>
@@ -337,7 +337,7 @@ static int au1550nd_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int au1550nd_remove(struct platform_device *pdev)<br>
+static void au1550nd_remove(struct platform_device *pdev)<br>
 {<br>
         struct au1550nd_ctx *ctx = platform_get_drvdata(pdev);<br>
         struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0);<br>
@@ -350,7 +350,6 @@ static int au1550nd_remove(struct platform_device *pdev)<br>
         iounmap(ctx->base);<br>
         release_mem_region(r->start, 0x1000);<br>
         kfree(ctx);<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver au1550nd_driver = {<br>
@@ -358,7 +357,7 @@ static struct platform_driver au1550nd_driver = {<br>
                 .name   = "au1550-nand",<br>
         },<br>
         .probe          = au1550nd_probe,<br>
-       .remove         = au1550nd_remove,<br>
+       .remove_new     = au1550nd_remove,<br>
 };<br>
 <br>
 module_platform_driver(au1550nd_driver);<br>
diff --git a/drivers/mtd/nand/raw/bcm47xxnflash/main.c b/drivers/mtd/nand/raw/bcm47xxnflash/main.c<br>
index dcc70d9dc6e5..ebcf508e0606 100644<br>
--- a/drivers/mtd/nand/raw/bcm47xxnflash/main.c<br>
+++ b/drivers/mtd/nand/raw/bcm47xxnflash/main.c<br>
@@ -57,7 +57,7 @@ static int bcm47xxnflash_probe(struct platform_device *pdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int bcm47xxnflash_remove(struct platform_device *pdev)<br>
+static void bcm47xxnflash_remove(struct platform_device *pdev)<br>
 {<br>
         struct bcm47xxnflash *nflash = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &nflash->nand_chip;<br>
@@ -66,13 +66,11 @@ static int bcm47xxnflash_remove(struct platform_device *pdev)<br>
         ret = mtd_device_unregister(nand_to_mtd(chip));<br>
         WARN_ON(ret);<br>
         nand_cleanup(chip);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver bcm47xxnflash_driver = {<br>
         .probe  = bcm47xxnflash_probe,<br>
-       .remove = bcm47xxnflash_remove,<br>
+       .remove_new = bcm47xxnflash_remove,<br>
         .driver = {<br>
                 .name = "bcma_nflash",<br>
         },<br>
diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c<br>
index 7661a5cf1883..034ec564c2ed 100644<br>
--- a/drivers/mtd/nand/raw/cadence-nand-controller.c<br>
+++ b/drivers/mtd/nand/raw/cadence-nand-controller.c<br>
@@ -3055,18 +3055,16 @@ static int cadence_nand_dt_probe(struct platform_device *ofdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int cadence_nand_dt_remove(struct platform_device *ofdev)<br>
+static void cadence_nand_dt_remove(struct platform_device *ofdev)<br>
 {<br>
         struct cadence_nand_dt *dt = platform_get_drvdata(ofdev);<br>
 <br>
         cadence_nand_remove(&dt->cdns_ctrl);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver cadence_nand_dt_driver = {<br>
         .probe          = cadence_nand_dt_probe,<br>
-       .remove         = cadence_nand_dt_remove,<br>
+       .remove_new     = cadence_nand_dt_remove,<br>
         .driver         = {<br>
                 .name   = "cadence-nand-controller",<br>
                 .of_match_table = cadence_nand_dt_ids,<br>
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c<br>
index 3e98e3c255bf..415d6aaa8255 100644<br>
--- a/drivers/mtd/nand/raw/davinci_nand.c<br>
+++ b/drivers/mtd/nand/raw/davinci_nand.c<br>
@@ -821,7 +821,7 @@ static int nand_davinci_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int nand_davinci_remove(struct platform_device *pdev)<br>
+static void nand_davinci_remove(struct platform_device *pdev)<br>
 {<br>
         struct davinci_nand_info *info = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &info->chip;<br>
@@ -835,13 +835,11 @@ static int nand_davinci_remove(struct platform_device *pdev)<br>
         ret = mtd_device_unregister(nand_to_mtd(chip));<br>
         WARN_ON(ret);<br>
         nand_cleanup(chip);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver nand_davinci_driver = {<br>
         .probe          = nand_davinci_probe,<br>
-       .remove         = nand_davinci_remove,<br>
+       .remove_new     = nand_davinci_remove,<br>
         .driver         = {<br>
                 .name   = "davinci_nand",<br>
                 .of_match_table = of_match_ptr(davinci_nand_of_match),<br>
diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c<br>
index 8513bb9fcfcc..915047e3fbc2 100644<br>
--- a/drivers/mtd/nand/raw/denali_dt.c<br>
+++ b/drivers/mtd/nand/raw/denali_dt.c<br>
@@ -233,7 +233,7 @@ static int denali_dt_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int denali_dt_remove(struct platform_device *pdev)<br>
+static void denali_dt_remove(struct platform_device *pdev)<br>
 {<br>
         struct denali_dt *dt = platform_get_drvdata(pdev);<br>
 <br>
@@ -243,13 +243,11 @@ static int denali_dt_remove(struct platform_device *pdev)<br>
         clk_disable_unprepare(dt->clk_ecc);<br>
         clk_disable_unprepare(dt->clk_x);<br>
         clk_disable_unprepare(dt->clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver denali_dt_driver = {<br>
         .probe          = denali_dt_probe,<br>
-       .remove         = denali_dt_remove,<br>
+       .remove_new     = denali_dt_remove,<br>
         .driver         = {<br>
                 .name   = "denali-nand-dt",<br>
                 .of_match_table = denali_nand_dt_ids,<br>
diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c<br>
index e25119e58b69..1e3a80f06f33 100644<br>
--- a/drivers/mtd/nand/raw/fsl_elbc_nand.c<br>
+++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c<br>
@@ -963,7 +963,7 @@ static int fsl_elbc_nand_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int fsl_elbc_nand_remove(struct platform_device *pdev)<br>
+static void fsl_elbc_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl = fsl_lbc_ctrl_dev->nand;<br>
         struct fsl_elbc_mtd *priv = dev_get_drvdata(&pdev->dev);<br>
@@ -984,8 +984,6 @@ static int fsl_elbc_nand_remove(struct platform_device *pdev)<br>
         }<br>
         mutex_unlock(&fsl_elbc_nand_mutex);<br>
 <br>
-       return 0;<br>
-<br>
 }<br>
 <br>
 static const struct of_device_id fsl_elbc_nand_match[] = {<br>
@@ -1000,7 +998,7 @@ static struct platform_driver fsl_elbc_nand_driver = {<br>
                 .of_match_table = fsl_elbc_nand_match,<br>
         },<br>
         .probe = fsl_elbc_nand_probe,<br>
-       .remove = fsl_elbc_nand_remove,<br>
+       .remove_new = fsl_elbc_nand_remove,<br>
 };<br>
 <br>
 module_platform_driver(fsl_elbc_nand_driver);<br>
diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c<br>
index 02d500176838..fa537fee6701 100644<br>
--- a/drivers/mtd/nand/raw/fsl_ifc_nand.c<br>
+++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c<br>
@@ -1094,7 +1094,7 @@ static int fsl_ifc_nand_probe(struct platform_device *dev)<br>
         return ret;<br>
 }<br>
 <br>
-static int fsl_ifc_nand_remove(struct platform_device *dev)<br>
+static void fsl_ifc_nand_remove(struct platform_device *dev)<br>
 {<br>
         struct fsl_ifc_mtd *priv = dev_get_drvdata(&dev->dev);<br>
         struct nand_chip *chip = &priv->chip;<br>
@@ -1113,8 +1113,6 @@ static int fsl_ifc_nand_remove(struct platform_device *dev)<br>
                 kfree(ifc_nand_ctrl);<br>
         }<br>
         mutex_unlock(&fsl_ifc_nand_mutex);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id fsl_ifc_nand_match[] = {<br>
@@ -1131,7 +1129,7 @@ static struct platform_driver fsl_ifc_nand_driver = {<br>
                 .of_match_table = fsl_ifc_nand_match,<br>
         },<br>
         .probe       = fsl_ifc_nand_probe,<br>
-       .remove      = fsl_ifc_nand_remove,<br>
+       .remove_new  = fsl_ifc_nand_remove,<br>
 };<br>
 <br>
 module_platform_driver(fsl_ifc_nand_driver);<br>
diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c<br>
index b3cc427100a2..086426139173 100644<br>
--- a/drivers/mtd/nand/raw/fsl_upm.c<br>
+++ b/drivers/mtd/nand/raw/fsl_upm.c<br>
@@ -235,7 +235,7 @@ static int fun_probe(struct platform_device *ofdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int fun_remove(struct platform_device *ofdev)<br>
+static void fun_remove(struct platform_device *ofdev)<br>
 {<br>
         struct fsl_upm_nand *fun = dev_get_drvdata(&ofdev->dev);<br>
         struct nand_chip *chip = &fun->chip;<br>
@@ -245,8 +245,6 @@ static int fun_remove(struct platform_device *ofdev)<br>
         ret = mtd_device_unregister(mtd);<br>
         WARN_ON(ret);<br>
         nand_cleanup(chip);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id of_fun_match[] = {<br>
@@ -261,7 +259,7 @@ static struct platform_driver of_fun_driver = {<br>
                 .of_match_table = of_fun_match,<br>
         },<br>
         .probe          = fun_probe,<br>
-       .remove         = fun_remove,<br>
+       .remove_new     = fun_remove,<br>
 };<br>
 <br>
 module_platform_driver(of_fun_driver);<br>
diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c<br>
index 6b2bda815b88..d57867089079 100644<br>
--- a/drivers/mtd/nand/raw/fsmc_nand.c<br>
+++ b/drivers/mtd/nand/raw/fsmc_nand.c<br>
@@ -1165,7 +1165,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)<br>
 /*<br>
  * Clean up routine<br>
  */<br>
-static int fsmc_nand_remove(struct platform_device *pdev)<br>
+static void fsmc_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct fsmc_nand_data *host = platform_get_drvdata(pdev);<br>
 <br>
@@ -1184,8 +1184,6 @@ static int fsmc_nand_remove(struct platform_device *pdev)<br>
                 }<br>
                 clk_disable_unprepare(host->clk);<br>
         }<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 #ifdef CONFIG_PM_SLEEP<br>
@@ -1224,7 +1222,7 @@ static const struct of_device_id fsmc_nand_id_table[] = {<br>
 MODULE_DEVICE_TABLE(of, fsmc_nand_id_table);<br>
 <br>
 static struct platform_driver fsmc_nand_driver = {<br>
-       .remove = fsmc_nand_remove,<br>
+       .remove_new = fsmc_nand_remove,<br>
         .driver = {<br>
                 .name = "fsmc-nand",<br>
                 .of_match_table = fsmc_nand_id_table,<br>
diff --git a/drivers/mtd/nand/raw/gpio.c b/drivers/mtd/nand/raw/gpio.c<br>
index dcf28cff760d..d6cc2cb65214 100644<br>
--- a/drivers/mtd/nand/raw/gpio.c<br>
+++ b/drivers/mtd/nand/raw/gpio.c<br>
@@ -265,7 +265,7 @@ gpio_nand_get_io_sync(struct platform_device *pdev)<br>
         return platform_get_resource(pdev, IORESOURCE_MEM, 1);<br>
 }<br>
 <br>
-static int gpio_nand_remove(struct platform_device *pdev)<br>
+static void gpio_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct gpiomtd *gpiomtd = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &gpiomtd->nand_chip;<br>
@@ -280,8 +280,6 @@ static int gpio_nand_remove(struct platform_device *pdev)<br>
                 gpiod_set_value(gpiomtd->nwp, 0);<br>
         if (gpiomtd->nce && !IS_ERR(gpiomtd->nce))<br>
                 gpiod_set_value(gpiomtd->nce, 0);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int gpio_nand_probe(struct platform_device *pdev)<br>
@@ -394,7 +392,7 @@ static int gpio_nand_probe(struct platform_device *pdev)<br>
 <br>
 static struct platform_driver gpio_nand_driver = {<br>
         .probe          = gpio_nand_probe,<br>
-       .remove         = gpio_nand_remove,<br>
+       .remove_new     = gpio_nand_remove,<br>
         .driver         = {<br>
                 .name   = "gpio-nand",<br>
                 .of_match_table = of_match_ptr(gpio_nand_id_table),<br>
diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c<br>
index ada83344b0f9..500e7a28d2e4 100644<br>
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c<br>
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c<br>
@@ -2777,7 +2777,7 @@ static int gpmi_nand_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int gpmi_nand_remove(struct platform_device *pdev)<br>
+static void gpmi_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct gpmi_nand_data *this = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &this->nand;<br>
@@ -2791,7 +2791,6 @@ static int gpmi_nand_remove(struct platform_device *pdev)<br>
         nand_cleanup(chip);<br>
         gpmi_free_dma_buffer(this);<br>
         release_resources(this);<br>
-       return 0;<br>
 }<br>
 <br>
 #ifdef CONFIG_PM_SLEEP<br>
@@ -2860,7 +2859,7 @@ static struct platform_driver gpmi_nand_driver = {<br>
                 .of_match_table = gpmi_nand_id_table,<br>
         },<br>
         .probe   = gpmi_nand_probe,<br>
-       .remove  = gpmi_nand_remove,<br>
+       .remove_new = gpmi_nand_remove,<br>
 };<br>
 module_platform_driver(gpmi_nand_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/hisi504_nand.c b/drivers/mtd/nand/raw/hisi504_nand.c<br>
index c74f6b2192fc..fe291a2e5c77 100644<br>
--- a/drivers/mtd/nand/raw/hisi504_nand.c<br>
+++ b/drivers/mtd/nand/raw/hisi504_nand.c<br>
@@ -798,7 +798,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int hisi_nfc_remove(struct platform_device *pdev)<br>
+static void hisi_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct hinfc_host *host = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &host->chip;<br>
@@ -807,8 +807,6 @@ static int hisi_nfc_remove(struct platform_device *pdev)<br>
         ret = mtd_device_unregister(nand_to_mtd(chip));<br>
         WARN_ON(ret);<br>
         nand_cleanup(chip);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 #ifdef CONFIG_PM_SLEEP<br>
@@ -860,7 +858,7 @@ static struct platform_driver hisi_nfc_driver = {<br>
                 .pm = &hisi_nfc_pm_ops,<br>
         },<br>
         .probe          = hisi_nfc_probe,<br>
-       .remove         = hisi_nfc_remove,<br>
+       .remove_new     = hisi_nfc_remove,<br>
 };<br>
 <br>
 module_platform_driver(hisi_nfc_driver);<br>
diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c<br>
index ff26c10f295d..b9f135297aa0 100644<br>
--- a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c<br>
+++ b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c<br>
@@ -522,7 +522,7 @@ static int ingenic_nand_probe(struct platform_device *pdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int ingenic_nand_remove(struct platform_device *pdev)<br>
+static void ingenic_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct ingenic_nfc *nfc = platform_get_drvdata(pdev);<br>
 <br>
@@ -530,8 +530,6 @@ static int ingenic_nand_remove(struct platform_device *pdev)<br>
                 ingenic_ecc_release(nfc->ecc);<br>
 <br>
         ingenic_nand_cleanup_chips(nfc);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct jz_soc_info jz4740_soc_info = {<br>
@@ -564,7 +562,7 @@ MODULE_DEVICE_TABLE(of, ingenic_nand_dt_match);<br>
 <br>
 static struct platform_driver ingenic_nand_driver = {<br>
         .probe          = ingenic_nand_probe,<br>
-       .remove         = ingenic_nand_remove,<br>
+       .remove_new     = ingenic_nand_remove,<br>
         .driver = {<br>
                 .name   = DRV_NAME,<br>
                 .of_match_table = ingenic_nand_dt_match,<br>
diff --git a/drivers/mtd/nand/raw/intel-nand-controller.c b/drivers/mtd/nand/raw/intel-nand-controller.c<br>
index 6f4cea81f97c..a9909eb08124 100644<br>
--- a/drivers/mtd/nand/raw/intel-nand-controller.c<br>
+++ b/drivers/mtd/nand/raw/intel-nand-controller.c<br>
@@ -706,7 +706,7 @@ static int ebu_nand_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int ebu_nand_remove(struct platform_device *pdev)<br>
+static void ebu_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct ebu_nand_controller *ebu_host = platform_get_drvdata(pdev);<br>
         int ret;<br>
@@ -717,8 +717,6 @@ static int ebu_nand_remove(struct platform_device *pdev)<br>
         ebu_nand_disable(&ebu_host->chip);<br>
         ebu_dma_cleanup(ebu_host);<br>
         clk_disable_unprepare(ebu_host->clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id ebu_nand_match[] = {<br>
@@ -729,7 +727,7 @@ MODULE_DEVICE_TABLE(of, ebu_nand_match);<br>
 <br>
 static struct platform_driver ebu_nand_driver = {<br>
         .probe = ebu_nand_probe,<br>
-       .remove = ebu_nand_remove,<br>
+       .remove_new = ebu_nand_remove,<br>
         .driver = {<br>
                 .name = "intel-nand-controller",<br>
                 .of_match_table = ebu_nand_match,<br>
diff --git a/drivers/mtd/nand/raw/lpc32xx_mlc.c b/drivers/mtd/nand/raw/lpc32xx_mlc.c<br>
index ae7f6429a5f6..b3136ae6f4e9 100644<br>
--- a/drivers/mtd/nand/raw/lpc32xx_mlc.c<br>
+++ b/drivers/mtd/nand/raw/lpc32xx_mlc.c<br>
@@ -827,7 +827,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)<br>
 /*<br>
  * Remove NAND device<br>
  */<br>
-static int lpc32xx_nand_remove(struct platform_device *pdev)<br>
+static void lpc32xx_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct lpc32xx_nand_host *host = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &host->nand_chip;<br>
@@ -846,8 +846,6 @@ static int lpc32xx_nand_remove(struct platform_device *pdev)<br>
 <br>
         lpc32xx_wp_enable(host);<br>
         gpiod_put(host->wp_gpio);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int lpc32xx_nand_resume(struct platform_device *pdev)<br>
@@ -889,7 +887,7 @@ MODULE_DEVICE_TABLE(of, lpc32xx_nand_match);<br>
 <br>
 static struct platform_driver lpc32xx_nand_driver = {<br>
         .probe          = lpc32xx_nand_probe,<br>
-       .remove         = lpc32xx_nand_remove,<br>
+       .remove_new     = lpc32xx_nand_remove,<br>
         .resume         = pm_ptr(lpc32xx_nand_resume),<br>
         .suspend        = pm_ptr(lpc32xx_nand_suspend),<br>
         .driver         = {<br>
diff --git a/drivers/mtd/nand/raw/lpc32xx_slc.c b/drivers/mtd/nand/raw/lpc32xx_slc.c<br>
index 6918737346c9..3139b6107660 100644<br>
--- a/drivers/mtd/nand/raw/lpc32xx_slc.c<br>
+++ b/drivers/mtd/nand/raw/lpc32xx_slc.c<br>
@@ -946,7 +946,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)<br>
 /*<br>
  * Remove NAND device.<br>
  */<br>
-static int lpc32xx_nand_remove(struct platform_device *pdev)<br>
+static void lpc32xx_nand_remove(struct platform_device *pdev)<br>
 {<br>
         uint32_t tmp;<br>
         struct lpc32xx_nand_host *host = platform_get_drvdata(pdev);<br>
@@ -965,8 +965,6 @@ static int lpc32xx_nand_remove(struct platform_device *pdev)<br>
 <br>
         clk_disable_unprepare(host->clk);<br>
         lpc32xx_wp_enable(host);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int lpc32xx_nand_resume(struct platform_device *pdev)<br>
@@ -1015,7 +1013,7 @@ MODULE_DEVICE_TABLE(of, lpc32xx_nand_match);<br>
 <br>
 static struct platform_driver lpc32xx_nand_driver = {<br>
         .probe          = lpc32xx_nand_probe,<br>
-       .remove         = lpc32xx_nand_remove,<br>
+       .remove_new     = lpc32xx_nand_remove,<br>
         .resume         = pm_ptr(lpc32xx_nand_resume),<br>
         .suspend        = pm_ptr(lpc32xx_nand_suspend),<br>
         .driver         = {<br>
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c<br>
index 3034916d2e25..afb424579f0b 100644<br>
--- a/drivers/mtd/nand/raw/marvell_nand.c<br>
+++ b/drivers/mtd/nand/raw/marvell_nand.c<br>
@@ -3004,7 +3004,7 @@ static int marvell_nfc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int marvell_nfc_remove(struct platform_device *pdev)<br>
+static void marvell_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct marvell_nfc *nfc = platform_get_drvdata(pdev);<br>
 <br>
@@ -3017,8 +3017,6 @@ static int marvell_nfc_remove(struct platform_device *pdev)<br>
 <br>
         clk_disable_unprepare(nfc->reg_clk);<br>
         clk_disable_unprepare(nfc->core_clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int __maybe_unused marvell_nfc_suspend(struct device *dev)<br>
@@ -3154,7 +3152,7 @@ static struct platform_driver marvell_nfc_driver = {<br>
         },<br>
         .id_table = marvell_nfc_platform_ids,<br>
         .probe = marvell_nfc_probe,<br>
-       .remove = marvell_nfc_remove,<br>
+       .remove_new = marvell_nfc_remove,<br>
 };<br>
 module_platform_driver(marvell_nfc_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c<br>
index 5ee01231ac4c..24f1ad025cda 100644<br>
--- a/drivers/mtd/nand/raw/meson_nand.c<br>
+++ b/drivers/mtd/nand/raw/meson_nand.c<br>
@@ -1434,20 +1434,18 @@ static int meson_nfc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int meson_nfc_remove(struct platform_device *pdev)<br>
+static void meson_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct meson_nfc *nfc = platform_get_drvdata(pdev);<br>
 <br>
         meson_nfc_nand_chip_cleanup(nfc);<br>
 <br>
         meson_nfc_disable_clk(nfc);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver meson_nfc_driver = {<br>
         .probe  = meson_nfc_probe,<br>
-       .remove = meson_nfc_remove,<br>
+       .remove_new = meson_nfc_remove,<br>
         .driver = {<br>
                 .name  = "meson-nand",<br>
                 .of_match_table = meson_nfc_id_table,<br>
diff --git a/drivers/mtd/nand/raw/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c<br>
index f68349cb7824..ab05ee65702c 100644<br>
--- a/drivers/mtd/nand/raw/mpc5121_nfc.c<br>
+++ b/drivers/mtd/nand/raw/mpc5121_nfc.c<br>
@@ -822,7 +822,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)<br>
         return retval;<br>
 }<br>
 <br>
-static int mpc5121_nfc_remove(struct platform_device *op)<br>
+static void mpc5121_nfc_remove(struct platform_device *op)<br>
 {<br>
         struct device *dev = &op->dev;<br>
         struct mtd_info *mtd = dev_get_drvdata(dev);<br>
@@ -832,8 +832,6 @@ static int mpc5121_nfc_remove(struct platform_device *op)<br>
         WARN_ON(ret);<br>
         nand_cleanup(mtd_to_nand(mtd));<br>
         mpc5121_nfc_free(dev, mtd);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id mpc5121_nfc_match[] = {<br>
@@ -844,7 +842,7 @@ MODULE_DEVICE_TABLE(of, mpc5121_nfc_match);<br>
 <br>
 static struct platform_driver mpc5121_nfc_driver = {<br>
         .probe          = mpc5121_nfc_probe,<br>
-       .remove         = mpc5121_nfc_remove,<br>
+       .remove_new     = mpc5121_nfc_remove,<br>
         .driver         = {<br>
                 .name = DRV_NAME,<br>
                 .of_match_table = mpc5121_nfc_match,<br>
diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c<br>
index d540454cbbdf..b2fa6b2074ab 100644<br>
--- a/drivers/mtd/nand/raw/mtk_nand.c<br>
+++ b/drivers/mtd/nand/raw/mtk_nand.c<br>
@@ -1601,7 +1601,7 @@ static int mtk_nfc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int mtk_nfc_remove(struct platform_device *pdev)<br>
+static void mtk_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct mtk_nfc *nfc = platform_get_drvdata(pdev);<br>
         struct mtk_nfc_nand_chip *mtk_chip;<br>
@@ -1620,8 +1620,6 @@ static int mtk_nfc_remove(struct platform_device *pdev)<br>
 <br>
         mtk_ecc_release(nfc->ecc);<br>
         mtk_nfc_disable_clk(&nfc->clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 #ifdef CONFIG_PM_SLEEP<br>
@@ -1663,7 +1661,7 @@ static SIMPLE_DEV_PM_OPS(mtk_nfc_pm_ops, mtk_nfc_suspend, mtk_nfc_resume);<br>
 <br>
 static struct platform_driver mtk_nfc_driver = {<br>
         .probe  = mtk_nfc_probe,<br>
-       .remove = mtk_nfc_remove,<br>
+       .remove_new = mtk_nfc_remove,<br>
         .driver = {<br>
                 .name  = MTK_NAME,<br>
                 .of_match_table = mtk_nfc_id_table,<br>
diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c<br>
index f6c96341b896..56c1046cc073 100644<br>
--- a/drivers/mtd/nand/raw/mxc_nand.c<br>
+++ b/drivers/mtd/nand/raw/mxc_nand.c<br>
@@ -1831,7 +1831,7 @@ static int mxcnd_probe(struct platform_device *pdev)<br>
         return err;<br>
 }<br>
 <br>
-static int mxcnd_remove(struct platform_device *pdev)<br>
+static void mxcnd_remove(struct platform_device *pdev)<br>
 {<br>
         struct mxc_nand_host *host = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &host->nand;<br>
@@ -1842,8 +1842,6 @@ static int mxcnd_remove(struct platform_device *pdev)<br>
         nand_cleanup(chip);<br>
         if (host->clk_act)<br>
                 clk_disable_unprepare(host->clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver mxcnd_driver = {<br>
@@ -1852,7 +1850,7 @@ static struct platform_driver mxcnd_driver = {<br>
                    .of_match_table = mxcnd_dt_ids,<br>
         },<br>
         .probe = mxcnd_probe,<br>
-       .remove = mxcnd_remove,<br>
+       .remove_new = mxcnd_remove,<br>
 };<br>
 module_platform_driver(mxcnd_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/mxic_nand.c b/drivers/mtd/nand/raw/mxic_nand.c<br>
index da1070993994..be8050e84b4f 100644<br>
--- a/drivers/mtd/nand/raw/mxic_nand.c<br>
+++ b/drivers/mtd/nand/raw/mxic_nand.c<br>
@@ -553,7 +553,7 @@ static int mxic_nfc_probe(struct platform_device *pdev)<br>
         return err;<br>
 }<br>
 <br>
-static int mxic_nfc_remove(struct platform_device *pdev)<br>
+static void mxic_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct mxic_nand_ctlr *nfc = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &nfc->chip;<br>
@@ -564,7 +564,6 @@ static int mxic_nfc_remove(struct platform_device *pdev)<br>
         nand_cleanup(chip);<br>
 <br>
         mxic_nfc_clk_disable(nfc);<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id mxic_nfc_of_ids[] = {<br>
@@ -575,7 +574,7 @@ MODULE_DEVICE_TABLE(of, mxic_nfc_of_ids);<br>
 <br>
 static struct platform_driver mxic_nfc_driver = {<br>
         .probe = mxic_nfc_probe,<br>
-       .remove = mxic_nfc_remove,<br>
+       .remove_new = mxic_nfc_remove,<br>
         .driver = {<br>
                 .name = "mxic-nfc",<br>
                 .of_match_table = mxic_nfc_of_ids,<br>
diff --git a/drivers/mtd/nand/raw/ndfc.c b/drivers/mtd/nand/raw/ndfc.c<br>
index 338d6b1a189e..57f3db32122d 100644<br>
--- a/drivers/mtd/nand/raw/ndfc.c<br>
+++ b/drivers/mtd/nand/raw/ndfc.c<br>
@@ -240,7 +240,7 @@ static int ndfc_probe(struct platform_device *ofdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int ndfc_remove(struct platform_device *ofdev)<br>
+static void ndfc_remove(struct platform_device *ofdev)<br>
 {<br>
         struct ndfc_controller *ndfc = dev_get_drvdata(&ofdev->dev);<br>
         struct nand_chip *chip = &ndfc->chip;<br>
@@ -251,8 +251,6 @@ static int ndfc_remove(struct platform_device *ofdev)<br>
         WARN_ON(ret);<br>
         nand_cleanup(chip);<br>
         kfree(mtd->name);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id ndfc_match[] = {<br>
@@ -267,7 +265,7 @@ static struct platform_driver ndfc_driver = {<br>
                 .of_match_table = ndfc_match,<br>
         },<br>
         .probe = ndfc_probe,<br>
-       .remove = ndfc_remove,<br>
+       .remove_new = ndfc_remove,<br>
 };<br>
 <br>
 module_platform_driver(ndfc_driver);<br>
diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c<br>
index 4a9f2b6c772d..db22b3af16d8 100644<br>
--- a/drivers/mtd/nand/raw/omap2.c<br>
+++ b/drivers/mtd/nand/raw/omap2.c<br>
@@ -2273,7 +2273,7 @@ static int omap_nand_probe(struct platform_device *pdev)<br>
         return err;<br>
 }<br>
 <br>
-static int omap_nand_remove(struct platform_device *pdev)<br>
+static void omap_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct mtd_info *mtd = platform_get_drvdata(pdev);<br>
         struct nand_chip *nand_chip = mtd_to_nand(mtd);<br>
@@ -2285,7 +2285,6 @@ static int omap_nand_remove(struct platform_device *pdev)<br>
                 dma_release_channel(info->dma);<br>
         WARN_ON(mtd_device_unregister(mtd));<br>
         nand_cleanup(nand_chip);<br>
-       return 0;<br>
 }<br>
 <br>
 /* omap_nand_ids defined in linux/platform_data/mtd-nand-omap2.h */<br>
@@ -2293,7 +2292,7 @@ MODULE_DEVICE_TABLE(of, omap_nand_ids);<br>
 <br>
 static struct platform_driver omap_nand_driver = {<br>
         .probe          = omap_nand_probe,<br>
-       .remove         = omap_nand_remove,<br>
+       .remove_new     = omap_nand_remove,<br>
         .driver         = {<br>
                 .name   = DRIVER_NAME,<br>
                 .of_match_table = omap_nand_ids,<br>
diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c<br>
index 4796a48e1012..6e1eac6644a6 100644<br>
--- a/drivers/mtd/nand/raw/omap_elm.c<br>
+++ b/drivers/mtd/nand/raw/omap_elm.c<br>
@@ -422,11 +422,10 @@ static int elm_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int elm_remove(struct platform_device *pdev)<br>
+static void elm_remove(struct platform_device *pdev)<br>
 {<br>
         pm_runtime_put_sync(&pdev->dev);<br>
         pm_runtime_disable(&pdev->dev);<br>
-       return 0;<br>
 }<br>
 <br>
 #ifdef CONFIG_PM_SLEEP<br>
@@ -561,7 +560,7 @@ static struct platform_driver elm_driver = {<br>
                 .pm     = &elm_pm_ops,<br>
         },<br>
         .probe  = elm_probe,<br>
-       .remove = elm_remove,<br>
+       .remove_new = elm_remove,<br>
 };<br>
 <br>
 module_platform_driver(elm_driver);<br>
diff --git a/drivers/mtd/nand/raw/orion_nand.c b/drivers/mtd/nand/raw/orion_nand.c<br>
index 1bfecf502216..39a6c6360588 100644<br>
--- a/drivers/mtd/nand/raw/orion_nand.c<br>
+++ b/drivers/mtd/nand/raw/orion_nand.c<br>
@@ -207,7 +207,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int orion_nand_remove(struct platform_device *pdev)<br>
+static void orion_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct orion_nand_info *info = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &info->chip;<br>
@@ -219,8 +219,6 @@ static int orion_nand_remove(struct platform_device *pdev)<br>
         nand_cleanup(chip);<br>
 <br>
         clk_disable_unprepare(info->clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 #ifdef CONFIG_OF<br>
@@ -232,7 +230,7 @@ MODULE_DEVICE_TABLE(of, orion_nand_of_match_table);<br>
 #endif<br>
 <br>
 static struct platform_driver orion_nand_driver = {<br>
-       .remove         = orion_nand_remove,<br>
+       .remove_new     = orion_nand_remove,<br>
         .driver         = {<br>
                 .name   = "orion_nand",<br>
                 .of_match_table = of_match_ptr(orion_nand_of_match_table),<br>
diff --git a/drivers/mtd/nand/raw/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c<br>
index cd112d45e0b5..e3c9807df1cd 100644<br>
--- a/drivers/mtd/nand/raw/oxnas_nand.c<br>
+++ b/drivers/mtd/nand/raw/oxnas_nand.c<br>
@@ -171,7 +171,7 @@ static int oxnas_nand_probe(struct platform_device *pdev)<br>
         return err;<br>
 }<br>
 <br>
-static int oxnas_nand_remove(struct platform_device *pdev)<br>
+static void oxnas_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct oxnas_nand_ctrl *oxnas = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip;<br>
@@ -184,8 +184,6 @@ static int oxnas_nand_remove(struct platform_device *pdev)<br>
         }<br>
 <br>
         clk_disable_unprepare(oxnas->clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id oxnas_nand_match[] = {<br>
@@ -196,7 +194,7 @@ MODULE_DEVICE_TABLE(of, oxnas_nand_match);<br>
 <br>
 static struct platform_driver oxnas_nand_driver = {<br>
         .probe  = oxnas_nand_probe,<br>
-       .remove = oxnas_nand_remove,<br>
+       .remove_new = oxnas_nand_remove,<br>
         .driver = {<br>
                 .name           = "oxnas_nand",<br>
                 .of_match_table = oxnas_nand_match,<br>
diff --git a/drivers/mtd/nand/raw/pasemi_nand.c b/drivers/mtd/nand/raw/pasemi_nand.c<br>
index f7ef6ca06ca9..19b2c9d25863 100644<br>
--- a/drivers/mtd/nand/raw/pasemi_nand.c<br>
+++ b/drivers/mtd/nand/raw/pasemi_nand.c<br>
@@ -197,7 +197,7 @@ static int pasemi_nand_probe(struct platform_device *ofdev)<br>
         return err;<br>
 }<br>
 <br>
-static int pasemi_nand_remove(struct platform_device *ofdev)<br>
+static void pasemi_nand_remove(struct platform_device *ofdev)<br>
 {<br>
         struct pasemi_ddata *ddata = platform_get_drvdata(ofdev);<br>
         struct mtd_info *pasemi_nand_mtd;<br>
@@ -218,8 +218,6 @@ static int pasemi_nand_remove(struct platform_device *ofdev)<br>
 <br>
         /* Free the MTD device structure */<br>
         kfree(ddata);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id pasemi_nand_match[] =<br>
@@ -239,7 +237,7 @@ static struct platform_driver pasemi_nand_driver =<br>
                 .of_match_table = pasemi_nand_match,<br>
         },<br>
         .probe          = pasemi_nand_probe,<br>
-       .remove         = pasemi_nand_remove,<br>
+       .remove_new     = pasemi_nand_remove,<br>
 };<br>
 <br>
 module_platform_driver(pasemi_nand_driver);<br>
diff --git a/drivers/mtd/nand/raw/pl35x-nand-controller.c b/drivers/mtd/nand/raw/pl35x-nand-controller.c<br>
index 3c6f6aff649f..28b7bd7e22eb 100644<br>
--- a/drivers/mtd/nand/raw/pl35x-nand-controller.c<br>
+++ b/drivers/mtd/nand/raw/pl35x-nand-controller.c<br>
@@ -1163,13 +1163,11 @@ static int pl35x_nand_probe(struct platform_device *pdev)<br>
         return 0;<br>
 }<br>
 <br>
-static int pl35x_nand_remove(struct platform_device *pdev)<br>
+static void pl35x_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct pl35x_nandc *nfc = platform_get_drvdata(pdev);<br>
 <br>
         pl35x_nand_chips_cleanup(nfc);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id pl35x_nand_of_match[] = {<br>
@@ -1180,7 +1178,7 @@ MODULE_DEVICE_TABLE(of, pl35x_nand_of_match);<br>
 <br>
 static struct platform_driver pl35x_nandc_driver = {<br>
         .probe = pl35x_nand_probe,<br>
-       .remove = pl35x_nand_remove,<br>
+       .remove_new = pl35x_nand_remove,<br>
         .driver = {<br>
                 .name = PL35X_NANDC_DRIVER_NAME,<br>
                 .of_match_table = pl35x_nand_of_match,<br>
diff --git a/drivers/mtd/nand/raw/plat_nand.c b/drivers/mtd/nand/raw/plat_nand.c<br>
index 7e0d0a8dfd1e..b5c374b51ecd 100644<br>
--- a/drivers/mtd/nand/raw/plat_nand.c<br>
+++ b/drivers/mtd/nand/raw/plat_nand.c<br>
@@ -122,7 +122,7 @@ static int plat_nand_probe(struct platform_device *pdev)<br>
 /*<br>
  * Remove a NAND device.<br>
  */<br>
-static int plat_nand_remove(struct platform_device *pdev)<br>
+static void plat_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct plat_nand_data *data = platform_get_drvdata(pdev);<br>
         struct platform_nand_data *pdata = dev_get_platdata(&pdev->dev);<br>
@@ -134,8 +134,6 @@ static int plat_nand_remove(struct platform_device *pdev)<br>
         nand_cleanup(chip);<br>
         if (pdata->ctrl.remove)<br>
                 pdata->ctrl.remove(pdev);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id plat_nand_match[] = {<br>
@@ -146,7 +144,7 @@ MODULE_DEVICE_TABLE(of, plat_nand_match);<br>
 <br>
 static struct platform_driver plat_nand_driver = {<br>
         .probe  = plat_nand_probe,<br>
-       .remove = plat_nand_remove,<br>
+       .remove_new = plat_nand_remove,<br>
         .driver = {<br>
                 .name           = "gen_nand",<br>
                 .of_match_table = plat_nand_match,<br>
diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c<br>
index 198a44794d2d..218c8a840e32 100644<br>
--- a/drivers/mtd/nand/raw/qcom_nandc.c<br>
+++ b/drivers/mtd/nand/raw/qcom_nandc.c<br>
@@ -3315,7 +3315,7 @@ static int qcom_nandc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int qcom_nandc_remove(struct platform_device *pdev)<br>
+static void qcom_nandc_remove(struct platform_device *pdev)<br>
 {<br>
         struct qcom_nand_controller *nandc = platform_get_drvdata(pdev);<br>
         struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);<br>
@@ -3337,8 +3337,6 @@ static int qcom_nandc_remove(struct platform_device *pdev)<br>
 <br>
         dma_unmap_resource(&pdev->dev, nandc->base_dma, resource_size(res),<br>
                            DMA_BIDIRECTIONAL, 0);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct qcom_nandc_props ipq806x_nandc_props = {<br>
@@ -3405,7 +3403,7 @@ static struct platform_driver qcom_nandc_driver = {<br>
                 .of_match_table = qcom_nandc_of_match,<br>
         },<br>
         .probe   = qcom_nandc_probe,<br>
-       .remove  = qcom_nandc_remove,<br>
+       .remove_new = qcom_nandc_remove,<br>
 };<br>
 module_platform_driver(qcom_nandc_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/renesas-nand-controller.c b/drivers/mtd/nand/raw/renesas-nand-controller.c<br>
index 1620e25a1147..589021ea9eb2 100644<br>
--- a/drivers/mtd/nand/raw/renesas-nand-controller.c<br>
+++ b/drivers/mtd/nand/raw/renesas-nand-controller.c<br>
@@ -1386,15 +1386,13 @@ static int rnandc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int rnandc_remove(struct platform_device *pdev)<br>
+static void rnandc_remove(struct platform_device *pdev)<br>
 {<br>
         struct rnandc *rnandc = platform_get_drvdata(pdev);<br>
 <br>
         rnandc_chips_cleanup(rnandc);<br>
 <br>
         pm_runtime_put(&pdev->dev);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id rnandc_id_table[] = {<br>
@@ -1410,7 +1408,7 @@ static struct platform_driver rnandc_driver = {<br>
                 .of_match_table = rnandc_id_table,<br>
         },<br>
         .probe = rnandc_probe,<br>
-       .remove = rnandc_remove,<br>
+       .remove_new = rnandc_remove,<br>
 };<br>
 module_platform_driver(rnandc_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/rockchip-nand-controller.c b/drivers/mtd/nand/raw/rockchip-nand-controller.c<br>
index f133985cc053..2312e27362cb 100644<br>
--- a/drivers/mtd/nand/raw/rockchip-nand-controller.c<br>
+++ b/drivers/mtd/nand/raw/rockchip-nand-controller.c<br>
@@ -1427,7 +1427,7 @@ static int rk_nfc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int rk_nfc_remove(struct platform_device *pdev)<br>
+static void rk_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct rk_nfc *nfc = platform_get_drvdata(pdev);<br>
 <br>
@@ -1435,8 +1435,6 @@ static int rk_nfc_remove(struct platform_device *pdev)<br>
         kfree(nfc->oob_buf);<br>
         rk_nfc_chips_cleanup(nfc);<br>
         rk_nfc_disable_clks(nfc);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int __maybe_unused rk_nfc_suspend(struct device *dev)<br>
@@ -1476,7 +1474,7 @@ static const struct dev_pm_ops rk_nfc_pm_ops = {<br>
 <br>
 static struct platform_driver rk_nfc_driver = {<br>
         .probe = rk_nfc_probe,<br>
-       .remove = rk_nfc_remove,<br>
+       .remove_new = rk_nfc_remove,<br>
         .driver = {<br>
                 .name = "rockchip-nfc",<br>
                 .of_match_table = rk_nfc_id_table,<br>
diff --git a/drivers/mtd/nand/raw/s3c2410.c b/drivers/mtd/nand/raw/s3c2410.c<br>
index 80d96f94d6cb..ac80aaf5b4e3 100644<br>
--- a/drivers/mtd/nand/raw/s3c2410.c<br>
+++ b/drivers/mtd/nand/raw/s3c2410.c<br>
@@ -709,12 +709,12 @@ static void s3c2440_nand_write_buf(struct nand_chip *this, const u_char *buf,<br>
 <br>
 /* device management functions */<br>
 <br>
-static int s3c24xx_nand_remove(struct platform_device *pdev)<br>
+static void s3c24xx_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct s3c2410_nand_info *info = to_nand_info(pdev);<br>
 <br>
         if (info == NULL)<br>
-               return 0;<br>
+               return;<br>
 <br>
         /* Release all our mtds  and their partitions, then go through<br>
          * freeing the resources used<br>
@@ -735,8 +735,6 @@ static int s3c24xx_nand_remove(struct platform_device *pdev)<br>
 <br>
         if (!IS_ERR(info->clk))<br>
                 s3c2410_nand_clk_set_state(info, CLOCK_DISABLE);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,<br>
@@ -1218,7 +1216,7 @@ MODULE_DEVICE_TABLE(platform, s3c24xx_driver_ids);<br>
 <br>
 static struct platform_driver s3c24xx_nand_driver = {<br>
         .probe          = s3c24xx_nand_probe,<br>
-       .remove         = s3c24xx_nand_remove,<br>
+       .remove_new     = s3c24xx_nand_remove,<br>
         .suspend        = s3c24xx_nand_suspend,<br>
         .resume         = s3c24xx_nand_resume,<br>
         .id_table       = s3c24xx_driver_ids,<br>
diff --git a/drivers/mtd/nand/raw/sh_flctl.c b/drivers/mtd/nand/raw/sh_flctl.c<br>
index a278829469d6..63bf20c41719 100644<br>
--- a/drivers/mtd/nand/raw/sh_flctl.c<br>
+++ b/drivers/mtd/nand/raw/sh_flctl.c<br>
@@ -1203,7 +1203,7 @@ static int flctl_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int flctl_remove(struct platform_device *pdev)<br>
+static void flctl_remove(struct platform_device *pdev)<br>
 {<br>
         struct sh_flctl *flctl = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &flctl->chip;<br>
@@ -1214,12 +1214,10 @@ static int flctl_remove(struct platform_device *pdev)<br>
         WARN_ON(ret);<br>
         nand_cleanup(chip);<br>
         pm_runtime_disable(&pdev->dev);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver flctl_driver = {<br>
-       .remove         = flctl_remove,<br>
+       .remove_new     = flctl_remove,<br>
         .driver = {<br>
                 .name   = "sh_flctl",<br>
                 .of_match_table = of_flctl_match,<br>
diff --git a/drivers/mtd/nand/raw/sharpsl.c b/drivers/mtd/nand/raw/sharpsl.c<br>
index 52ce5162538a..2402dc5465d5 100644<br>
--- a/drivers/mtd/nand/raw/sharpsl.c<br>
+++ b/drivers/mtd/nand/raw/sharpsl.c<br>
@@ -210,7 +210,7 @@ static int sharpsl_nand_probe(struct platform_device *pdev)<br>
 /*<br>
  * Clean up routine<br>
  */<br>
-static int sharpsl_nand_remove(struct platform_device *pdev)<br>
+static void sharpsl_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct sharpsl_nand *sharpsl = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &sharpsl->chip;<br>
@@ -227,8 +227,6 @@ static int sharpsl_nand_remove(struct platform_device *pdev)<br>
 <br>
         /* Free the driver's structure */<br>
         kfree(sharpsl);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static struct platform_driver sharpsl_nand_driver = {<br>
@@ -236,7 +234,7 @@ static struct platform_driver sharpsl_nand_driver = {<br>
                 .name   = "sharpsl-nand",<br>
         },<br>
         .probe          = sharpsl_nand_probe,<br>
-       .remove         = sharpsl_nand_remove,<br>
+       .remove_new     = sharpsl_nand_remove,<br>
 };<br>
 <br>
 module_platform_driver(sharpsl_nand_driver);<br>
diff --git a/drivers/mtd/nand/raw/socrates_nand.c b/drivers/mtd/nand/raw/socrates_nand.c<br>
index fb39cc7ebce0..a8b720ffe9e8 100644<br>
--- a/drivers/mtd/nand/raw/socrates_nand.c<br>
+++ b/drivers/mtd/nand/raw/socrates_nand.c<br>
@@ -201,7 +201,7 @@ static int socrates_nand_probe(struct platform_device *ofdev)<br>
 /*<br>
  * Remove a NAND device.<br>
  */<br>
-static int socrates_nand_remove(struct platform_device *ofdev)<br>
+static void socrates_nand_remove(struct platform_device *ofdev)<br>
 {<br>
         struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev);<br>
         struct nand_chip *chip = &host->nand_chip;<br>
@@ -212,8 +212,6 @@ static int socrates_nand_remove(struct platform_device *ofdev)<br>
         nand_cleanup(chip);<br>
 <br>
         iounmap(host->io_base);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id socrates_nand_match[] =<br>
@@ -232,7 +230,7 @@ static struct platform_driver socrates_nand_driver = {<br>
                 .of_match_table = socrates_nand_match,<br>
         },<br>
         .probe          = socrates_nand_probe,<br>
-       .remove         = socrates_nand_remove,<br>
+       .remove_new     = socrates_nand_remove,<br>
 };<br>
 <br>
 module_platform_driver(socrates_nand_driver);<br>
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c<br>
index 5d627048c420..e3d09dd5963b 100644<br>
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c<br>
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c<br>
@@ -2021,7 +2021,7 @@ static int stm32_fmc2_nfc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int stm32_fmc2_nfc_remove(struct platform_device *pdev)<br>
+static void stm32_fmc2_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct stm32_fmc2_nfc *nfc = platform_get_drvdata(pdev);<br>
         struct stm32_fmc2_nand *nand = &nfc->nand;<br>
@@ -2045,8 +2045,6 @@ static int stm32_fmc2_nfc_remove(struct platform_device *pdev)<br>
         clk_disable_unprepare(nfc->clk);<br>
 <br>
         stm32_fmc2_nfc_wp_enable(nand);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int __maybe_unused stm32_fmc2_nfc_suspend(struct device *dev)<br>
@@ -2103,7 +2101,7 @@ MODULE_DEVICE_TABLE(of, stm32_fmc2_nfc_match);<br>
 <br>
 static struct platform_driver stm32_fmc2_nfc_driver = {<br>
         .probe  = stm32_fmc2_nfc_probe,<br>
-       .remove = stm32_fmc2_nfc_remove,<br>
+       .remove_new = stm32_fmc2_nfc_remove,<br>
         .driver = {<br>
                 .name = "stm32_fmc2_nfc",<br>
                 .of_match_table = stm32_fmc2_nfc_match,<br>
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c<br>
index 13e3e0198d15..9884304634f6 100644<br>
--- a/drivers/mtd/nand/raw/sunxi_nand.c<br>
+++ b/drivers/mtd/nand/raw/sunxi_nand.c<br>
@@ -2173,7 +2173,7 @@ static int sunxi_nfc_probe(struct platform_device *pdev)<br>
         return ret;<br>
 }<br>
 <br>
-static int sunxi_nfc_remove(struct platform_device *pdev)<br>
+static void sunxi_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct sunxi_nfc *nfc = platform_get_drvdata(pdev);<br>
 <br>
@@ -2185,8 +2185,6 @@ static int sunxi_nfc_remove(struct platform_device *pdev)<br>
                 dma_release_channel(nfc->dmac);<br>
         clk_disable_unprepare(nfc->mod_clk);<br>
         clk_disable_unprepare(nfc->ahb_clk);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct sunxi_nfc_caps sunxi_nfc_a10_caps = {<br>
@@ -2219,7 +2217,7 @@ static struct platform_driver sunxi_nfc_driver = {<br>
                 .of_match_table = sunxi_nfc_ids,<br>
         },<br>
         .probe = sunxi_nfc_probe,<br>
-       .remove = sunxi_nfc_remove,<br>
+       .remove_new = sunxi_nfc_remove,<br>
 };<br>
 module_platform_driver(sunxi_nfc_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c<br>
index a9b9031ce616..eb0b9d16e8da 100644<br>
--- a/drivers/mtd/nand/raw/tegra_nand.c<br>
+++ b/drivers/mtd/nand/raw/tegra_nand.c<br>
@@ -1220,7 +1220,7 @@ static int tegra_nand_probe(struct platform_device *pdev)<br>
         return err;<br>
 }<br>
 <br>
-static int tegra_nand_remove(struct platform_device *pdev)<br>
+static void tegra_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct tegra_nand_controller *ctrl = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = ctrl->chip;<br>
@@ -1232,8 +1232,6 @@ static int tegra_nand_remove(struct platform_device *pdev)<br>
 <br>
         pm_runtime_put_sync_suspend(ctrl->dev);<br>
         pm_runtime_force_suspend(ctrl->dev);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static int __maybe_unused tegra_nand_runtime_resume(struct device *dev)<br>
@@ -1277,7 +1275,7 @@ static struct platform_driver tegra_nand_driver = {<br>
                 .pm = &tegra_nand_pm,<br>
         },<br>
         .probe = tegra_nand_probe,<br>
-       .remove = tegra_nand_remove,<br>
+       .remove_new = tegra_nand_remove,<br>
 };<br>
 module_platform_driver(tegra_nand_driver);<br>
 <br>
diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c<br>
index b643332ea1ff..86522048e271 100644<br>
--- a/drivers/mtd/nand/raw/vf610_nfc.c<br>
+++ b/drivers/mtd/nand/raw/vf610_nfc.c<br>
@@ -909,7 +909,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)<br>
         return err;<br>
 }<br>
 <br>
-static int vf610_nfc_remove(struct platform_device *pdev)<br>
+static void vf610_nfc_remove(struct platform_device *pdev)<br>
 {<br>
         struct vf610_nfc *nfc = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &nfc->chip;<br>
@@ -919,7 +919,6 @@ static int vf610_nfc_remove(struct platform_device *pdev)<br>
         WARN_ON(ret);<br>
         nand_cleanup(chip);<br>
         clk_disable_unprepare(nfc->clk);<br>
-       return 0;<br>
 }<br>
 <br>
 #ifdef CONFIG_PM_SLEEP<br>
@@ -955,7 +954,7 @@ static struct platform_driver vf610_nfc_driver = {<br>
                 .pm     = &vf610_nfc_pm_ops,<br>
         },<br>
         .probe          = vf610_nfc_probe,<br>
-       .remove         = vf610_nfc_remove,<br>
+       .remove_new     = vf610_nfc_remove,<br>
 };<br>
 <br>
 module_platform_driver(vf610_nfc_driver);<br>
diff --git a/drivers/mtd/nand/raw/xway_nand.c b/drivers/mtd/nand/raw/xway_nand.c<br>
index 035b82aa2f4a..6b1e2a2bba15 100644<br>
--- a/drivers/mtd/nand/raw/xway_nand.c<br>
+++ b/drivers/mtd/nand/raw/xway_nand.c<br>
@@ -238,7 +238,7 @@ static int xway_nand_probe(struct platform_device *pdev)<br>
 /*<br>
  * Remove a NAND device.<br>
  */<br>
-static int xway_nand_remove(struct platform_device *pdev)<br>
+static void xway_nand_remove(struct platform_device *pdev)<br>
 {<br>
         struct xway_nand_data *data = platform_get_drvdata(pdev);<br>
         struct nand_chip *chip = &data->chip;<br>
@@ -247,8 +247,6 @@ static int xway_nand_remove(struct platform_device *pdev)<br>
         ret = mtd_device_unregister(nand_to_mtd(chip));<br>
         WARN_ON(ret);<br>
         nand_cleanup(chip);<br>
-<br>
-       return 0;<br>
 }<br>
 <br>
 static const struct of_device_id xway_nand_match[] = {<br>
@@ -258,7 +256,7 @@ static const struct of_device_id xway_nand_match[] = {<br>
 <br>
 static struct platform_driver xway_nand_driver = {<br>
         .probe  = xway_nand_probe,<br>
-       .remove = xway_nand_remove,<br>
+       .remove_new = xway_nand_remove,<br>
         .driver = {<br>
                 .name           = "lantiq,nand-xway",<br>
                 .of_match_table = xway_nand_match,<br>
<br>
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6<br>
-- <br>
2.39.2<br>
<br>
<br>
-- <br>
Pengutronix e.K.                           | Uwe Kleine-König            |<br>
Industrial Linux Solutions                 | <a href="https://www.pengutronix.de/">
https://www.pengutronix.de/</a> |<br>
</div>
</span></font></div>
</body>
</html>