Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274834
b: refs/heads/master
c: c77d809
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 9f69146 commit f73a670
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 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: 6fcdc92fce81eadcee262a7a66bf3207314fab87
refs/heads/master: c77d8092c761bc0ee219fd869e6cde876e2b7aa4
21 changes: 4 additions & 17 deletions trunk/drivers/mtd/maps/rbtx4939-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
struct rbtx4939_flash_info {
struct mtd_info *mtd;
struct map_info map;
int nr_parts;
struct mtd_partition *parts;
};

static int rbtx4939_flash_remove(struct platform_device *dev)
Expand All @@ -41,8 +39,6 @@ static int rbtx4939_flash_remove(struct platform_device *dev)
if (info->mtd) {
struct rbtx4939_flash_data *pdata = dev->dev.platform_data;

if (info->nr_parts)
kfree(info->parts);
mtd_device_unregister(info->mtd);
map_destroy(info->mtd);
}
Expand Down Expand Up @@ -106,20 +102,11 @@ static int rbtx4939_flash_probe(struct platform_device *dev)
info->mtd->owner = THIS_MODULE;
if (err)
goto err_out;
err = parse_mtd_partitions(info->mtd, NULL, &info->parts, 0);
if (err > 0) {
mtd_device_register(info->mtd, info->parts, err);
info->nr_parts = err;
return 0;
}
err = mtd_device_parse_register(info->mtd, NULL, 0,
pdata->parts, pdata->nr_parts);

if (pdata->nr_parts) {
pr_notice("Using rbtx4939 partition information\n");
mtd_device_register(info->mtd, pdata->parts, pdata->nr_parts);
return 0;
}

mtd_device_register(info->mtd, NULL, 0);
if (err)
goto err_out;
return 0;

err_out:
Expand Down

0 comments on commit f73a670

Please sign in to comment.