Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274838
b: refs/heads/master
c: ef5d79f
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 761c7e2 commit ba4776e
Show file tree
Hide file tree
Showing 2 changed files with 3 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: e062e2f52fed5bcf65b3228e991771a4a6030d85
refs/heads/master: ef5d79f1e15ded65af7a75fc464d5dd246a912c7
19 changes: 2 additions & 17 deletions trunk/drivers/mtd/nand/atmel_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,6 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
struct resource *regs;
struct resource *mem;
int res;
struct mtd_partition *partitions = NULL;
int num_partitions = 0;

mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!mem) {
Expand Down Expand Up @@ -652,24 +650,11 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
}

mtd->name = "atmel_nand";
num_partitions = parse_mtd_partitions(mtd, NULL, &partitions, 0);
if (num_partitions <= 0 && host->board->parts) {
partitions = host->board->parts;
num_partitions = host->board->num_parts;
}

if ((!partitions) || (num_partitions == 0)) {
printk(KERN_ERR "atmel_nand: No partitions defined, or unsupported device.\n");
res = -ENXIO;
goto err_no_partitions;
}

res = mtd_device_register(mtd, partitions, num_partitions);
res = mtd_device_parse_register(mtd, NULL, 0,
host->board->parts, host->board->num_parts);
if (!res)
return res;

err_no_partitions:
nand_release(mtd);
err_scan_tail:
err_scan_ident:
err_no_card:
Expand Down

0 comments on commit ba4776e

Please sign in to comment.