Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274832
b: refs/heads/master
c: 74fb3ab
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent e759520 commit 441f22a
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: d45fd1218897b05dfa977a49f72e6f7bdc3e2471
refs/heads/master: 74fb3ab9330ee4dd1a3ddf19cd0f3ef1202376d9
23 changes: 2 additions & 21 deletions trunk/drivers/mtd/maps/plat-ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ struct platram_info {
struct device *dev;
struct mtd_info *mtd;
struct map_info map;
struct mtd_partition *partitions;
bool free_partitions;
struct resource *area;
struct platdata_mtd_ram *pdata;
};
Expand Down Expand Up @@ -95,10 +93,6 @@ static int platram_remove(struct platform_device *pdev)

if (info->mtd) {
mtd_device_unregister(info->mtd);
if (info->partitions) {
if (info->free_partitions)
kfree(info->partitions);
}
map_destroy(info->mtd);
}

Expand Down Expand Up @@ -228,21 +222,8 @@ static int platram_probe(struct platform_device *pdev)
/* check to see if there are any available partitions, or wether
* to add this device whole */

if (!pdata->nr_partitions) {
/* try to probe using the supplied probe type */
if (pdata->probes) {
err = parse_mtd_partitions(info->mtd, pdata->probes,
&info->partitions, 0);
info->free_partitions = 1;
if (err > 0)
err = mtd_device_register(info->mtd,
info->partitions, err);
}
}
/* use the static mapping */
else
err = mtd_device_register(info->mtd, pdata->partitions,
pdata->nr_partitions);
err = mtd_device_parse_register(info->mtd, pdata->probes, 0,
pdata->partitions, pdata->nr_partitions);
if (!err)
dev_info(&pdev->dev, "registered mtd device\n");

Expand Down

0 comments on commit 441f22a

Please sign in to comment.