Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252537
b: refs/heads/master
c: e6232b4
h: refs/heads/master
i:
  252535: 255ec21
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 914a977 commit 68c9758
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 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: 5e7e96866df7a9ff7733bd1660e0a3c510bf1b45
refs/heads/master: e6232b42438cefc06124b1e09613d8b27f6b6f5d
12 changes: 1 addition & 11 deletions trunk/drivers/mtd/nand/atmel_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,8 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
struct resource *regs;
struct resource *mem;
int res;

#ifdef CONFIG_MTD_PARTITIONS
struct mtd_partition *partitions = NULL;
int num_partitions = 0;
#endif

mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!mem) {
Expand Down Expand Up @@ -657,7 +654,6 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
goto err_scan_tail;
}

#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_CMDLINE_PARTS
mtd->name = "atmel_nand";
num_partitions = parse_mtd_partitions(mtd, part_probes,
Expand All @@ -673,17 +669,11 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
goto err_no_partitions;
}

res = add_mtd_partitions(mtd, partitions, num_partitions);
#else
res = add_mtd_device(mtd);
#endif

res = mtd_device_register(mtd, partitions, num_partitions);
if (!res)
return res;

#ifdef CONFIG_MTD_PARTITIONS
err_no_partitions:
#endif
nand_release(mtd);
err_scan_tail:
err_scan_ident:
Expand Down

0 comments on commit 68c9758

Please sign in to comment.