Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274829
b: refs/heads/master
c: ca97dec
h: refs/heads/master
i:
  274827: c07478e
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 22c8982 commit 92214af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 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: bc413f11ddf2c692cc533f474d28a154abe4541f
refs/heads/master: ca97dec2ab5c87e9fbdf7e882e1820004a3966fa
14 changes: 2 additions & 12 deletions trunk/drivers/mtd/maps/lantiq-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ ltq_mtd_probe(struct platform_device *pdev)
{
struct physmap_flash_data *ltq_mtd_data = dev_get_platdata(&pdev->dev);
struct ltq_mtd *ltq_mtd;
struct mtd_partition *parts;
struct resource *res;
int nr_parts = 0;
struct cfi_private *cfi;
int err;

Expand Down Expand Up @@ -170,16 +168,8 @@ ltq_mtd_probe(struct platform_device *pdev)
cfi->addr_unlock1 ^= 1;
cfi->addr_unlock2 ^= 1;

nr_parts = parse_mtd_partitions(ltq_mtd->mtd, NULL, &parts, 0);
if (nr_parts > 0) {
dev_info(&pdev->dev,
"using %d partitions from cmdline", nr_parts);
} else {
nr_parts = ltq_mtd_data->nr_parts;
parts = ltq_mtd_data->parts;
}

err = add_mtd_partitions(ltq_mtd->mtd, parts, nr_parts);
err = mtd_device_parse_register(ltq_mtd->mtd, NULL, 0,
ltq_mtd_data->parts, ltq_mtd_data->nr_parts);
if (err) {
dev_err(&pdev->dev, "failed to add partitions\n");
goto err_destroy;
Expand Down

0 comments on commit 92214af

Please sign in to comment.