Skip to contentSkip to conversation

NAND: fsl_upm: fix build problem with 2.6.28-rc2

PATCH In review Wolfgang Grandegger 2 participants 2 messages Oct 30, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NAND: fsl_upm: fix build problem with 2.6.28-rc2

This patch fixes a problem with building the 2.6.28-rc2 kernel with FSL UPM NAND support for the TQM8548 modules. For some reason of_mtd_parse_partitions() requires on argument less in the meantime. Furthermore, the return value is checks properly.

drivers/mtd/nand/fsl_upm.c +5 -3
index 024e3ff..a83192f 100644
@@ -163,9 +163,11 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
 	ret = parse_mtd_partitions(&fun->mtd, part_types, &fun->parts, 0);
 
 #ifdef CONFIG_MTD_OF_PARTS
-	if (ret == 0)
-		ret = of_mtd_parse_partitions(fun->dev, &fun->mtd,
-					      flash_np, &fun->parts);
+	if (ret == 0) {
+		ret = of_mtd_parse_partitions(fun->dev, flash_np, &fun->parts);
+		if (ret < 0)
+			goto err;
+	}
 #endif
 	if (ret > 0)
 		ret = add_mtd_partitions(&fun->mtd, fun->parts, ret);
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Wolfgang Grandegger

This patch fixes a problem with building the 2.6.28-rc2 kernel with FSL UPM NAND support for the TQM8548 modules. For some reason of_mtd_parse_partitions() requires on argument less in the meantime. Furthermore, the return value is checks properly.

This is becase of this commit:

commit 69fd3a8d098faf41a04930afa83757c0555ee360

Author: Sebastian Andrzej Siewior <[email protected]>
Date:   Sun Oct 12 16:18:36 2008 +0200

[MTD] remove unused mtd parameter in of_mtd_parse_partitions()

Quoted 1 line
Quoted 9 lines
drivers/mtd/nand/fsl_upm.c +0 -1
index 024e3ff..a83192f 100644
@@ -163,9 +163,11 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
 	ret = parse_mtd_partitions(&fun->mtd, part_types, &fun->parts, 0);
 
 #ifdef CONFIG_MTD_OF_PARTS
-	if (ret == 0)

drivers/mtd/nand/fsl_upm.c static int __devinit fun_chip_init(struct fsl_upm_nand *fun, · line 173

Quoted 10 lines
drivers/mtd/nand/fsl_upm.c +5 -2
-		ret = of_mtd_parse_partitions(fun->dev, &fun->mtd,
-					      flash_np, &fun->parts);
+	if (ret == 0) {
+		ret = of_mtd_parse_partitions(fun->dev, flash_np, &fun->parts);
+		if (ret < 0)
+			goto err;
+	}
 #endif
 	if (ret > 0)
 		ret = add_mtd_partitions(&fun->mtd, fun->parts, ret);

Thanks,

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2