Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274797
b: refs/heads/master
c: c842f57
h: refs/heads/master
i:
  274795: 1387250
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent f79b9ca commit 94cb549
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 16b206e62f9b43ba864571a6808844aaddea7479
refs/heads/master: c842f570a6e3ac002389ab7154084e32f4f5021a
13 changes: 5 additions & 8 deletions trunk/drivers/mtd/nand/pxa3xx_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,8 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
{
struct pxa3xx_nand_platform_data *pdata;
struct pxa3xx_nand_info *info;
struct mtd_partition *parts;
int nr_parts;

pdata = pdev->dev.platform_data;
if (!pdata) {
Expand All @@ -1146,16 +1148,11 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
return -ENODEV;
}

if (mtd_has_cmdlinepart()) {
const char *probes[] = { "cmdlinepart", NULL };
struct mtd_partition *parts;
int nr_parts;

nr_parts = parse_mtd_partitions(info->mtd, probes, &parts, 0);
nr_parts = parse_mtd_partitions(info->mtd, NULL, &parts, 0);

if (nr_parts)
return mtd_device_register(info->mtd, parts, nr_parts);
}
if (nr_parts)
return mtd_device_register(info->mtd, parts, nr_parts);

return mtd_device_register(info->mtd, pdata->parts, pdata->nr_parts);
}
Expand Down

0 comments on commit 94cb549

Please sign in to comment.