Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252533
b: refs/heads/master
c: 2fe2e24
h: refs/heads/master
i:
  252531: 48041a0
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent a57f6d4 commit 139359d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 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: 16b0eb154393831eddcf4f19cdca323611c86c9f
refs/heads/master: 2fe2e24ead67530d624e0bb23da9f0bfdec44f8c
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/maps/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ config MTD_CDB89712

config MTD_SA1100
tristate "CFI Flash device mapped on StrongARM SA11x0"
depends on MTD_CFI && ARCH_SA1100 && MTD_PARTITIONS
depends on MTD_CFI && ARCH_SA1100
help
This enables access to the flash chips on most platforms based on
the SA1100 and SA1110, including the Assabet and the Compaq iPAQ.
Expand Down
21 changes: 6 additions & 15 deletions trunk/drivers/mtd/maps/sa1100-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,7 @@ static void sa1100_destroy(struct sa_info *info, struct flash_platform_data *pla
int i;

if (info->mtd) {
if (info->nr_parts == 0)
del_mtd_device(info->mtd);
#ifdef CONFIG_MTD_PARTITIONS
else
del_mtd_partitions(info->mtd);
#endif
mtd_device_unregister(info->mtd);
if (info->mtd != info->subdev[0].mtd)
mtd_concat_destroy(info->mtd);
}
Expand Down Expand Up @@ -363,28 +358,24 @@ static int __devinit sa1100_mtd_probe(struct platform_device *pdev)
/*
* Partition selection stuff.
*/
#ifdef CONFIG_MTD_PARTITIONS
nr_parts = parse_mtd_partitions(info->mtd, part_probes, &parts, 0);
if (nr_parts > 0) {
info->parts = parts;
part_type = "dynamic";
} else
#endif
{
} else {
parts = plat->parts;
nr_parts = plat->nr_parts;
part_type = "static";
}

if (nr_parts == 0) {
if (nr_parts == 0)
printk(KERN_NOTICE "SA1100 flash: no partition info "
"available, registering whole flash\n");
add_mtd_device(info->mtd);
} else {
else
printk(KERN_NOTICE "SA1100 flash: using %s partition "
"definition\n", part_type);
add_mtd_partitions(info->mtd, parts, nr_parts);
}

mtd_device_register(info->mtd, parts, nr_parts);

info->nr_parts = nr_parts;

Expand Down

0 comments on commit 139359d

Please sign in to comment.