Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252524
b: refs/heads/master
c: bc2ffdd
h: refs/heads/master
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 9beb527 commit 6fd5cd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 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: 98b3979b92143656a2361eb5bdc14f5b50b95bce
refs/heads/master: bc2ffddc46be60c12462f8ae60ed0eae2a62a17b
20 changes: 3 additions & 17 deletions trunk/drivers/mtd/maps/dc21285.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,13 @@ static struct map_info dc21285_map = {


/* Partition stuff */
#ifdef CONFIG_MTD_PARTITIONS
static struct mtd_partition *dc21285_parts;
static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
#endif

static int __init init_dc21285(void)
{

#ifdef CONFIG_MTD_PARTITIONS
int nrparts;
#endif

/* Determine bankwidth */
switch (*CSR_SA110_CNTL & (3<<14)) {
Expand Down Expand Up @@ -204,13 +200,8 @@ static int __init init_dc21285(void)

dc21285_mtd->owner = THIS_MODULE;

#ifdef CONFIG_MTD_PARTITIONS
nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0);
if (nrparts > 0)
add_mtd_partitions(dc21285_mtd, dc21285_parts, nrparts);
else
#endif
add_mtd_device(dc21285_mtd);
mtd_device_register(dc21285_mtd, dc21285_parts, nrparts);

if(machine_is_ebsa285()) {
/*
Expand All @@ -232,14 +223,9 @@ static int __init init_dc21285(void)

static void __exit cleanup_dc21285(void)
{
#ifdef CONFIG_MTD_PARTITIONS
if (dc21285_parts) {
del_mtd_partitions(dc21285_mtd);
mtd_device_unregister(dc21285_mtd);
if (dc21285_parts)
kfree(dc21285_parts);
} else
#endif
del_mtd_device(dc21285_mtd);

map_destroy(dc21285_mtd);
iounmap(dc21285_map.virt);
}
Expand Down

0 comments on commit 6fd5cd8

Please sign in to comment.