Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274873
b: refs/heads/master
c: 9d7948c
h: refs/heads/master
i:
  274871: 6b2ab68
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 130466d commit 2f34080
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3702ea4915363102870a6af60d06d655ca4a09d
refs/heads/master: 9d7948c50055e74b693ce9e99a709b2e5bbc1942
11 changes: 3 additions & 8 deletions trunk/drivers/mtd/nand/ndfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
{
struct device_node *flash_np;
struct nand_chip *chip = &ndfc->chip;
struct mtd_part_parser_data ppdata;
int ret;

chip->IO_ADDR_R = ndfc->ndfcbase + NDFC_DATA;
Expand Down Expand Up @@ -188,6 +189,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
if (!flash_np)
return -ENODEV;

ppdata->of_node = flash_np;
ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s",
dev_name(&ndfc->ofdev->dev), flash_np->name);
if (!ndfc->mtd.name) {
Expand All @@ -199,17 +201,10 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
if (ret)
goto err;

ret = parse_mtd_partitions(&ndfc->mtd, NULL, &ndfc->parts, 0);
ret = parse_mtd_partitions(&ndfc->mtd, NULL, &ndfc->parts, &ppdata);
if (ret < 0)
goto err;

if (ret == 0) {
ret = of_mtd_parse_partitions(&ndfc->ofdev->dev, flash_np,
&ndfc->parts);
if (ret < 0)
goto err;
}

ret = mtd_device_register(&ndfc->mtd, ndfc->parts, ret);

err:
Expand Down

0 comments on commit 2f34080

Please sign in to comment.