Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274831
b: refs/heads/master
c: d45fd12
h: refs/heads/master
i:
  274829: 92214af
  274827: c07478e
  274823: 4b2d972
  274815: 151db13
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 0e8e368 commit e759520
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 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: 6e6e44c8bf73cdbd3600f18cb195fc965c0f1b45
refs/heads/master: d45fd1218897b05dfa977a49f72e6f7bdc3e2471
23 changes: 2 additions & 21 deletions trunk/drivers/mtd/maps/physmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ struct physmap_flash_info {
struct mtd_info *mtd[MAX_RESOURCES];
struct mtd_info *cmtd;
struct map_info map[MAX_RESOURCES];
int nr_parts;
struct mtd_partition *parts;
};

static int physmap_flash_remove(struct platform_device *dev)
Expand All @@ -46,8 +44,6 @@ static int physmap_flash_remove(struct platform_device *dev)

if (info->cmtd) {
mtd_device_unregister(info->cmtd);
if (info->nr_parts)
kfree(info->parts);
if (info->cmtd != info->mtd[0])
mtd_concat_destroy(info->cmtd);
}
Expand Down Expand Up @@ -175,23 +171,8 @@ static int physmap_flash_probe(struct platform_device *dev)
if (err)
goto err_out;

err = parse_mtd_partitions(info->cmtd, part_probe_types,
&info->parts, 0);
if (err > 0) {
mtd_device_register(info->cmtd, info->parts, err);
info->nr_parts = err;
return 0;
}

if (physmap_data->nr_parts) {
printk(KERN_NOTICE "Using physmap partition information\n");
mtd_device_register(info->cmtd, physmap_data->parts,
physmap_data->nr_parts);
return 0;
}

mtd_device_register(info->cmtd, NULL, 0);

mtd_device_parse_register(info->cmtd, part_probe_types, 0,
physmap_data->parts, physmap_data->nr_parts);
return 0;

err_out:
Expand Down

0 comments on commit e759520

Please sign in to comment.