Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274852
b: refs/heads/master
c: 725b75a
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 4ea9803 commit 64bd56c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 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: 009c840770fda0165302e9853192a7f0677098b3
refs/heads/master: 725b75a4acd34e39685483864e824b430e55e2ac
42 changes: 10 additions & 32 deletions trunk/drivers/mtd/nand/ppchameleonevb.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ static int ppchameleonevb_device_ready(struct mtd_info *minfo)
static int __init ppchameleonevb_init(void)
{
struct nand_chip *this;
const char *part_type = 0;
int mtd_parts_nb = 0;
struct mtd_partition *mtd_parts = 0;
void __iomem *ppchameleon_fio_base;
void __iomem *ppchameleonevb_fio_base;

Expand Down Expand Up @@ -276,24 +273,13 @@ static int __init ppchameleonevb_init(void)
#endif

ppchameleon_mtd->name = "ppchameleon-nand";
mtd_parts_nb = parse_mtd_partitions(ppchameleon_mtd, NULL, &mtd_parts, 0);
if (mtd_parts_nb > 0)
part_type = "command line";
else
mtd_parts_nb = 0;

if (mtd_parts_nb == 0) {
if (ppchameleon_mtd->size == NAND_SMALL_SIZE)
mtd_parts = partition_info_me;
else
mtd_parts = partition_info_hi;
mtd_parts_nb = NUM_PARTITIONS;
part_type = "static";
}

/* Register the partitions */
printk(KERN_NOTICE "Using %s partition definition\n", part_type);
mtd_device_register(ppchameleon_mtd, mtd_parts, mtd_parts_nb);
mtd_device_parse_register(ppchameleon_mtd, NULL, 0,
ppchameleon_mtd->size == NAND_SMALL_SIZE ?
partition_info_me :
partition_info_hi,
NUM_PARTITIONS);

nand_evb_init:
/****************************
Expand Down Expand Up @@ -377,21 +363,13 @@ static int __init ppchameleonevb_init(void)
}

ppchameleonevb_mtd->name = NAND_EVB_MTD_NAME;
mtd_parts_nb = parse_mtd_partitions(ppchameleonevb_mtd, NULL, &mtd_parts, 0);
if (mtd_parts_nb > 0)
part_type = "command line";
else
mtd_parts_nb = 0;

if (mtd_parts_nb == 0) {
mtd_parts = partition_info_evb;
mtd_parts_nb = NUM_PARTITIONS;
part_type = "static";
}

/* Register the partitions */
printk(KERN_NOTICE "Using %s partition definition\n", part_type);
mtd_device_register(ppchameleonevb_mtd, mtd_parts, mtd_parts_nb);
mtd_device_parse_register(ppchameleonevb_mtd, NULL, 0,
ppchameleon_mtd->size == NAND_SMALL_SIZE ?
partition_info_me :
partition_info_hi,
NUM_PARTITIONS);

/* Return happy */
return 0;
Expand Down

0 comments on commit 64bd56c

Please sign in to comment.