Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274847
b: refs/heads/master
c: 90ee1fb
h: refs/heads/master
i:
  274845: b90437f
  274843: 501c7a0
  274839: 135cc69
  274831: e759520
  274815: 151db13
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent e3f665f commit a4cbcf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: 4571c1396260d3f235d987f4acdadfba820f57bf
refs/heads/master: 90ee1fb3ac918362402a06d0f71545111f374980
11 changes: 3 additions & 8 deletions trunk/drivers/mtd/nand/jz4740_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,6 @@ 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;
struct mtd_partition *partition_info;
int num_partitions = 0;

nand = kzalloc(sizeof(*nand), GFP_KERNEL);
if (!nand) {
Expand Down Expand Up @@ -369,12 +367,9 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
goto err_gpio_free;
}

num_partitions = parse_mtd_partitions(mtd, NULL, &partition_info, 0);
if (num_partitions <= 0 && pdata) {
num_partitions = pdata->num_partitions;
partition_info = pdata->partitions;
}
ret = mtd_device_register(mtd, partition_info, num_partitions);
ret = mtd_device_parse_register(mtd, NULL, 0,
pdata ? pdata->partitions : NULL,
pdata ? pdata->num_partitions : 0);

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

0 comments on commit a4cbcf2

Please sign in to comment.