Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274824
b: refs/heads/master
c: 8db2a08
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 4b2d972 commit ef1883a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 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: 534e4928ad672a319c29b9f0c0593ad16766de53
refs/heads/master: 8db2a08ee469c1fcad5354c1144a673d88434424
21 changes: 2 additions & 19 deletions trunk/drivers/mtd/maps/h720x-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,11 @@ static struct mtd_partition h720x_partitions[] = {

#define NUM_PARTITIONS ARRAY_SIZE(h720x_partitions)

static int nr_mtd_parts;
static struct mtd_partition *mtd_parts;
/*
* Initialize FLASH support
*/
static int __init h720x_mtd_init(void)
{

char *part_type = NULL;

h720x_map.virt = ioremap(h720x_map.phys, h720x_map.size);

if (!h720x_map.virt) {
Expand All @@ -90,16 +85,8 @@ static int __init h720x_mtd_init(void)
if (mymtd) {
mymtd->owner = THIS_MODULE;

nr_mtd_parts = parse_mtd_partitions(mymtd, NULL, &mtd_parts, 0);
if (nr_mtd_parts > 0)
part_type = "command line";
if (nr_mtd_parts <= 0) {
mtd_parts = h720x_partitions;
nr_mtd_parts = NUM_PARTITIONS;
part_type = "builtin";
}
printk(KERN_INFO "Using %s partition table\n", part_type);
mtd_device_register(mymtd, mtd_parts, nr_mtd_parts);
mtd_device_parse_register(mymtd, NULL, 0,
h720x_partitions, NUM_PARTITIONS);
return 0;
}

Expand All @@ -118,10 +105,6 @@ static void __exit h720x_mtd_cleanup(void)
map_destroy(mymtd);
}

/* Free partition info, if commandline partition was used */
if (mtd_parts && (mtd_parts != h720x_partitions))
kfree (mtd_parts);

if (h720x_map.virt) {
iounmap((void *)h720x_map.virt);
h720x_map.virt = 0;
Expand Down

0 comments on commit ef1883a

Please sign in to comment.