summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/mpc5121_nfc.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-10-31 04:33:25 +0100
committerBrian Norris <computersforpeace@gmail.com>2015-11-11 22:58:45 +0100
commita61ae81a1907af1987ad4c77300508327bc48b23 (patch)
treed773d64c44c5fbfcc5eae47bca3c5f519c98833e /drivers/mtd/nand/mpc5121_nfc.c
parentmtd: spi-nor: convert to spi_nor_{get, set}_flash_node() (diff)
downloadlinux-a61ae81a1907af1987ad4c77300508327bc48b23.tar.xz
linux-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/mpc5121_nfc.c')
-rw-r--r--drivers/mtd/nand/mpc5121_nfc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
index d6bbde4a5331..0fdfc42f75f8 100644
--- a/drivers/mtd/nand/mpc5121_nfc.c
+++ b/drivers/mtd/nand/mpc5121_nfc.c
@@ -639,7 +639,6 @@ static int mpc5121_nfc_probe(struct platform_device *op)
int resettime = 0;
int retval = 0;
int rev, len;
- struct mtd_part_parser_data ppdata;
/*
* Check SoC revision. This driver supports only NFC
@@ -661,6 +660,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
mtd->priv = chip;
mtd->dev.parent = dev;
chip->priv = prv;
+ nand_set_flash_node(chip, dn);
prv->dev = dev;
/* Read NFC configuration from Reset Config Word */
@@ -703,7 +703,6 @@ static int mpc5121_nfc_probe(struct platform_device *op)
}
mtd->name = "MPC5121 NAND";
- ppdata.of_node = dn;
chip->dev_ready = mpc5121_nfc_dev_ready;
chip->cmdfunc = mpc5121_nfc_command;
chip->read_byte = mpc5121_nfc_read_byte;
@@ -815,7 +814,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
dev_set_drvdata(dev, mtd);
/* Register device in MTD */
- retval = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0);
+ retval = mtd_device_register(mtd, NULL, 0);
if (retval) {
dev_err(dev, "Error adding MTD device!\n");
goto error;