diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-10-30 20:33:28 -0700 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-11-11 13:58:59 -0800 |
commit | 004b5e6031f4e9fd90d565fb213b74cd06d03718 (patch) | |
tree | 937e49232f6edc0e295c86eeedab867929426bdf /drivers/mtd/maps/lantiq-flash.c | |
parent | 30069af7348b56eb8c5e1dda7788a531c5f24ca2 (diff) | |
download | linux-004b5e6031f4e9fd90d565fb213b74cd06d03718.tar.gz |
mtd: drop unnecessary partition parser data
We should assign the MTD dev.of_node instead of the parser data field.
This gets us the equivalent partition parser behavior with fewer special
fields and parameter passing.
Also convert several of these to mtd_device_register(), since we don't
need the 2nd and 3rd parameters anymore.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/maps/lantiq-flash.c')
-rw-r--r-- | drivers/mtd/maps/lantiq-flash.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c index 93852054977e..c8febb326fa6 100644 --- a/drivers/mtd/maps/lantiq-flash.c +++ b/drivers/mtd/maps/lantiq-flash.c @@ -110,7 +110,6 @@ ltq_copy_to(struct map_info *map, unsigned long to, static int ltq_mtd_probe(struct platform_device *pdev) { - struct mtd_part_parser_data ppdata; struct ltq_mtd *ltq_mtd; struct cfi_private *cfi; int err; @@ -161,13 +160,13 @@ ltq_mtd_probe(struct platform_device *pdev) } ltq_mtd->mtd->dev.parent = &pdev->dev; + mtd_set_of_node(ltq_mtd->mtd, pdev->dev.of_node); cfi = ltq_mtd->map->fldrv_priv; cfi->addr_unlock1 ^= 1; cfi->addr_unlock2 ^= 1; - ppdata.of_node = pdev->dev.of_node; - err = mtd_device_parse_register(ltq_mtd->mtd, NULL, &ppdata, NULL, 0); + err = mtd_device_register(ltq_mtd->mtd, NULL, 0); if (err) { dev_err(&pdev->dev, "failed to add partitions\n"); goto err_destroy; |