Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274858
b: refs/heads/master
c: 92ffb00
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 6b91472 commit 6794712
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: 9e58c5d42ff69e7d99cc8e37082f58ba44e7fa7d
refs/heads/master: 92ffb00d11b24e69cc87a0c0aa5de172d9de8e13
11 changes: 3 additions & 8 deletions trunk/drivers/mtd/onenand/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

struct onenand_info {
struct mtd_info mtd;
struct mtd_partition *parts;
struct onenand_chip onenand;
};

Expand Down Expand Up @@ -71,13 +70,9 @@ static int __devinit generic_onenand_probe(struct platform_device *pdev)
goto out_iounmap;
}

err = parse_mtd_partitions(&info->mtd, NULL, &info->parts, 0);
if (err > 0)
mtd_device_register(&info->mtd, info->parts, err);
else if (err <= 0 && pdata && pdata->parts)
mtd_device_register(&info->mtd, pdata->parts, pdata->nr_parts);
else
err = mtd_device_register(&info->mtd, NULL, 0);
err = mtd_device_parse_register(&info->mtd, NULL, 0,
pdata ? pdata->parts : NULL,
pdata ? pdata->nr_parts : 0);

platform_set_drvdata(pdev, info);

Expand Down

0 comments on commit 6794712

Please sign in to comment.