Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252555
b: refs/heads/master
c: 55c0689
h: refs/heads/master
i:
  252553: 2d59216
  252551: 746781f
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 5aa09b7 commit e977398
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 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: 54e07f5482cf76e87f1f56f709f279b164a620a5
refs/heads/master: 55c0689c08cfd0c596245d64c116794c9ee06a74
14 changes: 1 addition & 13 deletions trunk/drivers/mtd/nand/orion_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
#include <mach/hardware.h>
#include <plat/orion_nand.h>

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

static void orion_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
{
Expand Down Expand Up @@ -83,10 +81,8 @@ static int __init orion_nand_probe(struct platform_device *pdev)
struct resource *res;
void __iomem *io_base;
int ret = 0;
#ifdef CONFIG_MTD_PARTITIONS
struct mtd_partition *partitions = NULL;
int num_part = 0;
#endif

nc = kzalloc(sizeof(struct nand_chip) + sizeof(struct mtd_info), GFP_KERNEL);
if (!nc) {
Expand Down Expand Up @@ -136,7 +132,6 @@ static int __init orion_nand_probe(struct platform_device *pdev)
goto no_dev;
}

#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_CMDLINE_PARTS
mtd->name = "orion_nand";
num_part = parse_mtd_partitions(mtd, part_probes, &partitions, 0);
Expand All @@ -147,14 +142,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
partitions = board->parts;
}

if (partitions && num_part > 0)
ret = add_mtd_partitions(mtd, partitions, num_part);
else
ret = add_mtd_device(mtd);
#else
ret = add_mtd_device(mtd);
#endif

ret = mtd_device_register(mtd, partitions, num_part);
if (ret) {
nand_release(mtd);
goto no_dev;
Expand Down

0 comments on commit e977398

Please sign in to comment.