Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252549
b: refs/heads/master
c: 85358b2
h: refs/heads/master
i:
  252547: 88754e3
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 7d5d3f5 commit 4650938
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 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: c4a5522020ab3842880359aaae4464f08dcc74d5
refs/heads/master: 85358b2aa951ad096af444765baf1e275e8a0749
10 changes: 1 addition & 9 deletions trunk/drivers/mtd/nand/jz4740_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,8 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
struct nand_chip *chip;
struct mtd_info *mtd;
struct jz_nand_platform_data *pdata = pdev->dev.platform_data;
#ifdef CONFIG_MTD_PARTITIONS
struct mtd_partition *partition_info;
int num_partitions = 0;
#endif

nand = kzalloc(sizeof(*nand), GFP_KERNEL);
if (!nand) {
Expand Down Expand Up @@ -375,7 +373,6 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
goto err_gpio_free;
}

#ifdef CONFIG_MTD_PARTITIONS
#ifdef CONFIG_MTD_CMDLINE_PARTS
num_partitions = parse_mtd_partitions(mtd, part_probes,
&partition_info, 0);
Expand All @@ -384,12 +381,7 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
num_partitions = pdata->num_partitions;
partition_info = pdata->partitions;
}

if (num_partitions > 0)
ret = add_mtd_partitions(mtd, partition_info, num_partitions);
else
#endif
ret = add_mtd_device(mtd);
ret = mtd_device_register(mtd, partition_info, num_partitions);

if (ret) {
dev_err(&pdev->dev, "Failed to add mtd device\n");
Expand Down

0 comments on commit 4650938

Please sign in to comment.