Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274828
b: refs/heads/master
c: bc413f1
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent c07478e commit 22c8982
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 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: 200b8777ce270b491affb2bd81192f78f2d46213
refs/heads/master: bc413f11ddf2c692cc533f474d28a154abe4541f
29 changes: 4 additions & 25 deletions trunk/drivers/mtd/maps/ixp4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr)
struct ixp4xx_flash_info {
struct mtd_info *mtd;
struct map_info map;
struct mtd_partition *partitions;
struct resource *res;
};

Expand All @@ -168,8 +167,6 @@ static int ixp4xx_flash_remove(struct platform_device *dev)
if (info->map.virt)
iounmap(info->map.virt);

kfree(info->partitions);

if (info->res) {
release_resource(info->res);
kfree(info->res);
Expand All @@ -185,8 +182,6 @@ static int ixp4xx_flash_probe(struct platform_device *dev)
{
struct flash_platform_data *plat = dev->dev.platform_data;
struct ixp4xx_flash_info *info;
const char *part_type = NULL;
int nr_parts = 0;
int err = -1;

if (!plat)
Expand Down Expand Up @@ -252,28 +247,12 @@ static int ixp4xx_flash_probe(struct platform_device *dev)
/* Use the fast version */
info->map.write = ixp4xx_write16;

nr_parts = parse_mtd_partitions(info->mtd, probes, &info->partitions,
dev->resource->start);
if (nr_parts > 0) {
part_type = "dynamic";
} else {
info->partitions = plat->parts;
nr_parts = plat->nr_parts;
part_type = "static";
}
if (nr_parts == 0)
printk(KERN_NOTICE "IXP4xx flash: no partition info "
"available, registering whole flash\n");
else
printk(KERN_NOTICE "IXP4xx flash: using %s partition "
"definition\n", part_type);

err = mtd_device_register(info->mtd, info->partitions, nr_parts);
if (err)
err = mtd_device_parse_register(info->mtd, probes, dev->resource->start,
plat->parts, plat->nr_parts);
if (err) {
printk(KERN_ERR "Could not parse partitions\n");

if (err)
goto Error;
}

return 0;

Expand Down

0 comments on commit 22c8982

Please sign in to comment.