aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/lpc32xx_mlc.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-10-30 20:33:25 -0700
committerBrian Norris <computersforpeace@gmail.com>2015-11-11 13:58:45 -0800
commita61ae81a1907af1987ad4c77300508327bc48b23 (patch)
treed773d64c44c5fbfcc5eae47bca3c5f519c98833e /drivers/mtd/nand/lpc32xx_mlc.c
parentmtd: spi-nor: convert to spi_nor_{get, set}_flash_node() (diff)
downloadlinux-dev-a61ae81a1907af1987ad4c77300508327bc48b23.tar.xz
linux-dev-a61ae81a1907af1987ad4c77300508327bc48b23.zip
mtd: nand: drop unnecessary partition parser data
All of these drivers set up a parser data struct just to communicate DT partition data. This field has been deprecated and is instead supported by telling nand_scan_ident() about the 'flash_node'. This patch: * sets chip->flash_node for those drivers that didn't already (but used OF partitioning) * drops the parser data * switches to the simpler mtd_device_register() where possible, now that we've eliminated one of the auxiliary parameters Now that we've assigned chip->flash_node for these drivers, we can probably rely on nand_dt_init() to do more of the DT parsing for us, but for now, I don't want to fiddle with each of these drivers. The parsing is done in duplicate for now on some drivers. I don't think this should break things. (Famous last words.) (Rolled in some changes by Boris Brezillon) Signed-off-by: Brian Norris <computersforpeace@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand/lpc32xx_mlc.c')
-rw-r--r--drivers/mtd/nand/lpc32xx_mlc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c
index 347510978484..57c4b712cf1a 100644
--- a/drivers/mtd/nand/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/lpc32xx_mlc.c
@@ -647,7 +647,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
struct nand_chip *nand_chip;
struct resource *rc;
int res;
- struct mtd_part_parser_data ppdata = {};
/* Allocate memory for the device structure (and zero it) */
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
@@ -682,6 +681,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
host->pdata = dev_get_platdata(&pdev->dev);
nand_chip->priv = host; /* link the private data structures */
+ nand_set_flash_node(nand_chip, pdev->dev.of_node);
mtd->priv = nand_chip;
mtd->dev.parent = &pdev->dev;
@@ -786,9 +786,8 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
mtd->name = DRV_NAME;
- ppdata.of_node = pdev->dev.of_node;
- res = mtd_device_parse_register(mtd, NULL, &ppdata, host->ncfg->parts,
- host->ncfg->num_parts);
+ res = mtd_device_register(mtd, host->ncfg->parts,
+ host->ncfg->num_parts);
if (!res)
return res;