diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-10-31 06:33:25 +0300 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-11-12 00:58:45 +0300 |
commit | a61ae81a1907af1987ad4c77300508327bc48b23 (patch) | |
tree | d773d64c44c5fbfcc5eae47bca3c5f519c98833e /drivers/mtd/nand/hisi504_nand.c | |
parent | 9c7d787508be6d68a6ec66de3c3466b24e820c71 (diff) | |
download | 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/hisi504_nand.c')
-rw-r--r-- | drivers/mtd/nand/hisi504_nand.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c index 0cb2e886937d..0aad4acab9d6 100644 --- a/drivers/mtd/nand/hisi504_nand.c +++ b/drivers/mtd/nand/hisi504_nand.c @@ -704,7 +704,6 @@ static int hisi_nfc_probe(struct platform_device *pdev) struct mtd_info *mtd; struct resource *res; struct device_node *np = dev->of_node; - struct mtd_part_parser_data ppdata; host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL); if (!host) @@ -742,6 +741,7 @@ static int hisi_nfc_probe(struct platform_device *pdev) mtd->dev.parent = &pdev->dev; chip->priv = host; + nand_set_flash_node(chip, np); chip->cmdfunc = hisi_nfc_cmdfunc; chip->select_chip = hisi_nfc_select_chip; chip->read_byte = hisi_nfc_read_byte; @@ -805,8 +805,7 @@ static int hisi_nfc_probe(struct platform_device *pdev) goto err_res; } - ppdata.of_node = np; - ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); + ret = mtd_device_register(mtd, NULL, 0); if (ret) { dev_err(dev, "Err MTD partition=%d\n", ret); goto err_mtd; |