Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252528
b: refs/heads/master
c: 96b639f
h: refs/heads/master
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 4d726e5 commit 436e46f
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 360e40aedb59799fef4ff58fe6b9436cd487f6e6
refs/heads/master: 96b639fd5319986fc21f9d99a78cae97d099bc4c
22 changes: 3 additions & 19 deletions trunk/drivers/mtd/maps/impa7.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
#include <asm/io.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>

#ifdef CONFIG_MTD_PARTITIONS
#include <linux/mtd/partitions.h>
#endif

#define WINDOW_ADDR0 0x00000000 /* physical properties of flash */
#define WINDOW_SIZE0 0x00800000
Expand Down Expand Up @@ -49,8 +46,6 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = {
},
};

#ifdef CONFIG_MTD_PARTITIONS

/*
* MTD partitioning stuff
*/
Expand All @@ -66,8 +61,6 @@ static struct mtd_partition static_partitions[] =
static int mtd_parts_nb[NUM_FLASHBANKS];
static struct mtd_partition *mtd_parts[NUM_FLASHBANKS];

#endif

static const char *probes[] = { "cmdlinepart", NULL };

static int __init init_impa7(void)
Expand Down Expand Up @@ -104,7 +97,6 @@ static int __init init_impa7(void)
if (impa7_mtd[i]) {
impa7_mtd[i]->owner = THIS_MODULE;
devicesfound++;
#ifdef CONFIG_MTD_PARTITIONS
mtd_parts_nb[i] = parse_mtd_partitions(impa7_mtd[i],
probes,
&mtd_parts[i],
Expand All @@ -120,12 +112,8 @@ static int __init init_impa7(void)
printk(KERN_NOTICE MSG_PREFIX
"using %s partition definition\n",
part_type);
add_mtd_partitions(impa7_mtd[i],
mtd_parts[i], mtd_parts_nb[i]);
#else
add_mtd_device(impa7_mtd[i]);

#endif
mtd_device_register(impa7_mtd[i],
mtd_parts[i], mtd_parts_nb[i]);
}
else
iounmap((void *)impa7_map[i].virt);
Expand All @@ -138,11 +126,7 @@ static void __exit cleanup_impa7(void)
int i;
for (i=0; i<NUM_FLASHBANKS; i++) {
if (impa7_mtd[i]) {
#ifdef CONFIG_MTD_PARTITIONS
del_mtd_partitions(impa7_mtd[i]);
#else
del_mtd_device(impa7_mtd[i]);
#endif
mtd_device_unregister(impa7_mtd[i]);
map_destroy(impa7_mtd[i]);
iounmap((void *)impa7_map[i].virt);
impa7_map[i].virt = 0;
Expand Down

0 comments on commit 436e46f

Please sign in to comment.