Skip to content

Commit 7227aac

Browse files
committed
Merge tag 'nand/for-6.4' into mtd/next
Raw NAND core changes: * Convert to platform remove callback returning void * Fix spelling mistake waifunc() -> waitfunc() Raw NAND controller driver changes: * imx: Remove unused is_imx51_nfc and imx53_nfc functions * omap2: Drop obsolete dependency on COMPILE_TEST * orion: Use devm_platform_ioremap_resource() * qcom: - Use of_property_present() for testing DT property presence - Use devm_platform_get_and_ioremap_resource() * stm32_fmc2: Depends on ARCH_STM32 instead of MACH_STM32MP157 * tmio: Remove reference to config MTD_NAND_TMIO in the parsers Raw NAND manufacturer driver changes: * hynix: Fix up bit 0 of sdr_timing_mode SPI-NAND changes: * Add support for ESMT F50x1G41LB Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2 parents 38f1aa5 + ec185b1 commit 7227aac

58 files changed

Lines changed: 258 additions & 212 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/mtd/nand/ecc-mxic.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -847,13 +847,11 @@ static int mxic_ecc_probe(struct platform_device *pdev)
847847
return 0;
848848
}
849849

850-
static int mxic_ecc_remove(struct platform_device *pdev)
850+
static void mxic_ecc_remove(struct platform_device *pdev)
851851
{
852852
struct mxic_ecc_engine *mxic = platform_get_drvdata(pdev);
853853

854854
nand_ecc_unregister_on_host_hw_engine(&mxic->external_engine);
855-
856-
return 0;
857855
}
858856

859857
static const struct of_device_id mxic_ecc_of_ids[] = {
@@ -870,7 +868,7 @@ static struct platform_driver mxic_ecc_driver = {
870868
.of_match_table = mxic_ecc_of_ids,
871869
},
872870
.probe = mxic_ecc_probe,
873-
.remove = mxic_ecc_remove,
871+
.remove_new = mxic_ecc_remove,
874872
};
875873
module_platform_driver(mxic_ecc_driver);
876874

drivers/mtd/nand/onenand/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ config MTD_ONENAND_GENERIC
2525
config MTD_ONENAND_OMAP2
2626
tristate "OneNAND on OMAP2/OMAP3 support"
2727
depends on ARCH_OMAP2 || ARCH_OMAP3 || (COMPILE_TEST && ARM)
28-
depends on OF || COMPILE_TEST
28+
depends on OF
2929
depends on OMAP_GPMC
3030
help
3131
Support for a OneNAND flash device connected to an OMAP2/OMAP3 SoC

drivers/mtd/nand/onenand/generic.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static int generic_onenand_probe(struct platform_device *pdev)
8585
return err;
8686
}
8787

88-
static int generic_onenand_remove(struct platform_device *pdev)
88+
static void generic_onenand_remove(struct platform_device *pdev)
8989
{
9090
struct onenand_info *info = platform_get_drvdata(pdev);
9191
struct resource *res = pdev->resource;
@@ -97,16 +97,14 @@ static int generic_onenand_remove(struct platform_device *pdev)
9797
iounmap(info->onenand.base);
9898
kfree(info);
9999
}
100-
101-
return 0;
102100
}
103101

104102
static struct platform_driver generic_onenand_driver = {
105103
.driver = {
106104
.name = DRIVER_NAME,
107105
},
108106
.probe = generic_onenand_probe,
109-
.remove = generic_onenand_remove,
107+
.remove_new = generic_onenand_remove,
110108
};
111109

112110
module_platform_driver(generic_onenand_driver);

drivers/mtd/nand/onenand/onenand_omap2.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,16 +581,14 @@ static int omap2_onenand_probe(struct platform_device *pdev)
581581
return r;
582582
}
583583

584-
static int omap2_onenand_remove(struct platform_device *pdev)
584+
static void omap2_onenand_remove(struct platform_device *pdev)
585585
{
586586
struct omap2_onenand *c = dev_get_drvdata(&pdev->dev);
587587

588588
onenand_release(&c->mtd);
589589
if (c->dma_chan)
590590
dma_release_channel(c->dma_chan);
591591
omap2_onenand_shutdown(pdev);
592-
593-
return 0;
594592
}
595593

596594
static const struct of_device_id omap2_onenand_id_table[] = {
@@ -601,7 +599,7 @@ MODULE_DEVICE_TABLE(of, omap2_onenand_id_table);
601599

602600
static struct platform_driver omap2_onenand_driver = {
603601
.probe = omap2_onenand_probe,
604-
.remove = omap2_onenand_remove,
602+
.remove_new = omap2_onenand_remove,
605603
.shutdown = omap2_onenand_shutdown,
606604
.driver = {
607605
.name = DRIVER_NAME,

drivers/mtd/nand/onenand/onenand_samsung.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -943,13 +943,11 @@ static int s3c_onenand_probe(struct platform_device *pdev)
943943
return 0;
944944
}
945945

946-
static int s3c_onenand_remove(struct platform_device *pdev)
946+
static void s3c_onenand_remove(struct platform_device *pdev)
947947
{
948948
struct mtd_info *mtd = platform_get_drvdata(pdev);
949949

950950
onenand_release(mtd);
951-
952-
return 0;
953951
}
954952

955953
static int s3c_pm_ops_suspend(struct device *dev)
@@ -996,7 +994,7 @@ static struct platform_driver s3c_onenand_driver = {
996994
},
997995
.id_table = s3c_onenand_driver_ids,
998996
.probe = s3c_onenand_probe,
999-
.remove = s3c_onenand_remove,
997+
.remove_new = s3c_onenand_remove,
1000998
};
1001999

10021000
module_platform_driver(s3c_onenand_driver);

drivers/mtd/nand/raw/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ config MTD_NAND_TEGRA
373373

374374
config MTD_NAND_STM32_FMC2
375375
tristate "Support for NAND controller on STM32MP SoCs"
376-
depends on MACH_STM32MP157 || COMPILE_TEST
376+
depends on ARCH_STM32 || COMPILE_TEST
377377
select MFD_SYSCON
378378
help
379379
Enables support for NAND Flash chips on SoCs containing the FMC2

drivers/mtd/nand/raw/ams-delta.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ static int gpio_nand_probe(struct platform_device *pdev)
397397
/*
398398
* Clean up routine
399399
*/
400-
static int gpio_nand_remove(struct platform_device *pdev)
400+
static void gpio_nand_remove(struct platform_device *pdev)
401401
{
402402
struct gpio_nand *priv = platform_get_drvdata(pdev);
403403
struct mtd_info *mtd = nand_to_mtd(&priv->nand_chip);
@@ -410,8 +410,6 @@ static int gpio_nand_remove(struct platform_device *pdev)
410410
ret = mtd_device_unregister(mtd);
411411
WARN_ON(ret);
412412
nand_cleanup(mtd_to_nand(mtd));
413-
414-
return 0;
415413
}
416414

417415
#ifdef CONFIG_OF
@@ -434,7 +432,7 @@ MODULE_DEVICE_TABLE(platform, gpio_nand_plat_id_table);
434432

435433
static struct platform_driver gpio_nand_driver = {
436434
.probe = gpio_nand_probe,
437-
.remove = gpio_nand_remove,
435+
.remove_new = gpio_nand_remove,
438436
.id_table = gpio_nand_plat_id_table,
439437
.driver = {
440438
.name = "ams-delta-nand",

drivers/mtd/nand/raw/arasan-nand-controller.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,16 +1496,14 @@ static int anfc_probe(struct platform_device *pdev)
14961496
return ret;
14971497
}
14981498

1499-
static int anfc_remove(struct platform_device *pdev)
1499+
static void anfc_remove(struct platform_device *pdev)
15001500
{
15011501
struct arasan_nfc *nfc = platform_get_drvdata(pdev);
15021502

15031503
anfc_chips_cleanup(nfc);
15041504

15051505
clk_disable_unprepare(nfc->bus_clk);
15061506
clk_disable_unprepare(nfc->controller_clk);
1507-
1508-
return 0;
15091507
}
15101508

15111509
static const struct of_device_id anfc_ids[] = {
@@ -1525,7 +1523,7 @@ static struct platform_driver anfc_driver = {
15251523
.of_match_table = anfc_ids,
15261524
},
15271525
.probe = anfc_probe,
1528-
.remove = anfc_remove,
1526+
.remove_new = anfc_remove,
15291527
};
15301528
module_platform_driver(anfc_driver);
15311529

drivers/mtd/nand/raw/atmel/nand-controller.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,13 +2626,11 @@ static int atmel_nand_controller_probe(struct platform_device *pdev)
26262626
return caps->ops->probe(pdev, caps);
26272627
}
26282628

2629-
static int atmel_nand_controller_remove(struct platform_device *pdev)
2629+
static void atmel_nand_controller_remove(struct platform_device *pdev)
26302630
{
26312631
struct atmel_nand_controller *nc = platform_get_drvdata(pdev);
26322632

26332633
WARN_ON(nc->caps->ops->remove(nc));
2634-
2635-
return 0;
26362634
}
26372635

26382636
static __maybe_unused int atmel_nand_controller_resume(struct device *dev)
@@ -2663,7 +2661,7 @@ static struct platform_driver atmel_nand_controller_driver = {
26632661
.pm = &atmel_nand_controller_pm_ops,
26642662
},
26652663
.probe = atmel_nand_controller_probe,
2666-
.remove = atmel_nand_controller_remove,
2664+
.remove_new = atmel_nand_controller_remove,
26672665
};
26682666
module_platform_driver(atmel_nand_controller_driver);
26692667

drivers/mtd/nand/raw/au1550nd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static int au1550nd_probe(struct platform_device *pdev)
337337
return ret;
338338
}
339339

340-
static int au1550nd_remove(struct platform_device *pdev)
340+
static void au1550nd_remove(struct platform_device *pdev)
341341
{
342342
struct au1550nd_ctx *ctx = platform_get_drvdata(pdev);
343343
struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -350,15 +350,14 @@ static int au1550nd_remove(struct platform_device *pdev)
350350
iounmap(ctx->base);
351351
release_mem_region(r->start, 0x1000);
352352
kfree(ctx);
353-
return 0;
354353
}
355354

356355
static struct platform_driver au1550nd_driver = {
357356
.driver = {
358357
.name = "au1550-nand",
359358
},
360359
.probe = au1550nd_probe,
361-
.remove = au1550nd_remove,
360+
.remove_new = au1550nd_remove,
362361
};
363362

364363
module_platform_driver(au1550nd_driver);

0 commit comments

Comments
 (0)