Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252541
b: refs/heads/master
c: a17f7ca
h: refs/heads/master
i:
  252539: 6262922
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 8809d7a commit 65b6961
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 46720bbf67224660271a04a7ab03913fd0d3c206
refs/heads/master: a17f7ca510035beee7527f352b3a46fe5dcabce1
19 changes: 3 additions & 16 deletions trunk/drivers/mtd/nand/cs553x_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,22 +277,15 @@ static int is_geode(void)
return 0;
}


#ifdef CONFIG_MTD_PARTITIONS
static const char *part_probes[] = { "cmdlinepart", NULL };
#endif


static int __init cs553x_init(void)
{
int err = -ENXIO;
int i;
uint64_t val;

#ifdef CONFIG_MTD_PARTITIONS
int mtd_parts_nb = 0;
struct mtd_partition *mtd_parts = NULL;
#endif

/* If the CPU isn't a Geode GX or LX, abort */
if (!is_geode())
Expand Down Expand Up @@ -324,17 +317,11 @@ static int __init cs553x_init(void)
if (cs553x_mtd[i]) {

/* If any devices registered, return success. Else the last error. */
#ifdef CONFIG_MTD_PARTITIONS
mtd_parts_nb = parse_mtd_partitions(cs553x_mtd[i], part_probes, &mtd_parts, 0);
if (mtd_parts_nb > 0) {
if (mtd_parts_nb > 0)
printk(KERN_NOTICE "Using command line partition definition\n");
add_mtd_partitions(cs553x_mtd[i], mtd_parts, mtd_parts_nb);
} else {
add_mtd_device(cs553x_mtd[i]);
}
#else
add_mtd_device(cs553x_mtd[i]);
#endif
mtd_device_register(cs553x_mtd[i], mtd_parts,
mtd_parts_nb);
err = 0;
}
}
Expand Down

0 comments on commit 65b6961

Please sign in to comment.