[MTD] [NAND] fsl_upm: fix build problem with 2.6.28-rc2

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Nov 27 04:59:02 EST 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=29b65861fbece04cfdf3fee352d5247369131850
Commit:     29b65861fbece04cfdf3fee352d5247369131850
Parent:     3136e903fa2d493ebc1b8a8fbdde2d3a17f85acd
Author:     Wolfgang Grandegger <wg at grandegger.com>
AuthorDate: Thu Nov 27 09:46:13 2008 +0000
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Nov 27 09:46:13 2008 +0000

    [MTD] [NAND] fsl_upm: fix build problem with 2.6.28-rc2
    
    The patch fixes following build error:
    
      CC      drivers/mtd/nand/fsl_upm.o
    drivers/mtd/nand/fsl_upm.c: In function 'fun_chip_init':
    drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 2 of 'of_mtd_parse_partitions' from incompatible pointer type
    drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 3 of 'of_mtd_parse_partitions' from incompatible pointer type
    drivers/mtd/nand/fsl_upm.c:168: error: too many arguments to function 'of_mtd_parse_partitions'
    make[1]: *** [drivers/mtd/nand/fsl_upm.o] Error 1
    
    The breakage was introduced in 69fd3a8d098faf41a04930afa83757c0555ee360
    ("[MTD] remove unused mtd parameter in of_mtd_parse_partitions()").
    
    While at it, also add a check for the of_mtd_parse_partitions() return
    value.
    
    Signed-off-by: Wolfgang Grandegger <wg at grandegger.com>
    Signed-off-by: Anton Vorontsov <avorontsov at ru.mvista.com>
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/fsl_upm.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 024e3ff..a83192f 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -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);



More information about the linux-mtd-cvs mailing list