Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274821
b: refs/heads/master
c: cd3aafd
h: refs/heads/master
i:
  274819: 9e77c2f
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent ee6696f commit 9733b87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 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: 81939afce261694f8e91a71e2cc7c817c13c57fd
refs/heads/master: cd3aafd0bd3ad383fd43196bc8dcac2edfec95c2
16 changes: 2 additions & 14 deletions trunk/drivers/mtd/maps/bfin-async-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ struct async_state {
uint32_t flash_ambctl0, flash_ambctl1;
uint32_t save_ambctl0, save_ambctl1;
unsigned long irq_flags;
struct mtd_partition *parts;
};

static void switch_to_flash(struct async_state *state)
Expand Down Expand Up @@ -165,18 +164,8 @@ static int __devinit bfin_flash_probe(struct platform_device *pdev)
return -ENXIO;
}

ret = parse_mtd_partitions(state->mtd, part_probe_types, &pdata->parts, 0);
if (ret > 0) {
pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n");
mtd_device_register(state->mtd, pdata->parts, ret);
state->parts = pdata->parts;
} else if (pdata->nr_parts) {
pr_devinit(KERN_NOTICE DRIVER_NAME ": Using board partition definition\n");
mtd_device_register(state->mtd, pdata->parts, pdata->nr_parts);
} else {
pr_devinit(KERN_NOTICE DRIVER_NAME ": no partition info available, registering whole flash at once\n");
mtd_device_register(state->mtd, NULL, 0);
}
mtd_device_parse_register(state->mtd, part_probe_types, 0,
pdata->parts, pdata->nr_parts);

platform_set_drvdata(pdev, state);

Expand All @@ -188,7 +177,6 @@ static int __devexit bfin_flash_remove(struct platform_device *pdev)
struct async_state *state = platform_get_drvdata(pdev);
gpio_free(state->enet_flash_pin);
mtd_device_unregister(state->mtd);
kfree(state->parts);
map_destroy(state->mtd);
kfree(state);
return 0;
Expand Down

0 comments on commit 9733b87

Please sign in to comment.