Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274877
b: refs/heads/master
c: f44dcbd
h: refs/heads/master
i:
  274875: af7c258
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 0b07655 commit f91ab05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 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: fbcf62a32be1e897a1d730af430758f881f8ef35
refs/heads/master: f44dcbd06236ecc610bd03abeceac77a21cb019e
18 changes: 3 additions & 15 deletions trunk/drivers/mtd/maps/physmap_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@ struct of_flash_list {

struct of_flash {
struct mtd_info *cmtd;
struct mtd_partition *parts;
int list_size; /* number of elements in of_flash_list */
struct of_flash_list list[0];
};

#define OF_FLASH_PARTS(info) ((info)->parts)

static int of_flash_remove(struct platform_device *dev)
{
struct of_flash *info;
Expand All @@ -56,11 +53,8 @@ static int of_flash_remove(struct platform_device *dev)
mtd_concat_destroy(info->cmtd);
}

if (info->cmtd) {
if (OF_FLASH_PARTS(info))
kfree(OF_FLASH_PARTS(info));
if (info->cmtd)
mtd_device_unregister(info->cmtd);
}

for (i = 0; i < info->list_size; i++) {
if (info->list[i].mtd)
Expand Down Expand Up @@ -290,16 +284,10 @@ static int __devinit of_flash_probe(struct platform_device *dev)

ppdata.of_node = dp;
part_probe_types = of_get_probes(dp);
err = parse_mtd_partitions(info->cmtd, part_probe_types,
&info->parts, &ppdata);
if (err < 0) {
of_free_probes(part_probe_types);
goto err_out;
}
mtd_device_parse_register(info->cmtd, part_probe_types, &ppdata,
NULL, 0);
of_free_probes(part_probe_types);

mtd_device_register(info->cmtd, info->parts, err);

kfree(mtd_list);

return 0;
Expand Down

0 comments on commit f91ab05

Please sign in to comment.