summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/fsl_upm.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/fsl_upm.c
parent9c7d787508be6d68a6ec66de3c3466b24e820c71 (diff)
downloadlinux-a61ae81a1907af1987ad4c77300508327bc48b23.tar.gz
linux-a61ae81a1907af1987ad4c77300508327bc48b23.tar.xz
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/fsl_upm.c')
-rw-r--r--drivers/mtd/nand/fsl_upm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index d326369980c4..b3f4a01621c1 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -159,7 +159,6 @@ static int fun_chip_init(struct fsl_upm_nand *fun,
{
int ret;
struct device_node *flash_np;
- struct mtd_part_parser_data ppdata;
fun->chip.IO_ADDR_R = fun->io_base;
fun->chip.IO_ADDR_W = fun->io_base;
@@ -182,6 +181,7 @@ static int fun_chip_init(struct fsl_upm_nand *fun,
if (!flash_np)
return -ENODEV;
+ nand_set_flash_node(&fun->chip, flash_np);
fun->mtd.name = kasprintf(GFP_KERNEL, "0x%llx.%s", (u64)io_res->start,
flash_np->name);
if (!fun->mtd.name) {
@@ -193,8 +193,7 @@ static int fun_chip_init(struct fsl_upm_nand *fun,
if (ret)
goto err;
- ppdata.of_node = flash_np;
- ret = mtd_device_parse_register(&fun->mtd, NULL, &ppdata, NULL, 0);
+ ret = mtd_device_register(&fun->mtd, NULL, 0);
err:
of_node_put(flash_np);
if (ret)