* [PATCH] NAND: fsl_upm: fix build problem with 2.6.28-rc2
@ 2008-10-30 10:44 Wolfgang Grandegger
2008-10-30 11:03 ` Anton Vorontsov
0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Grandegger @ 2008-10-30 10:44 UTC (permalink / raw)
To: linux-mtd; +Cc: linuxppc-dev, David Woodhouse
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.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NAND: fsl_upm: fix build problem with 2.6.28-rc2
2008-10-30 10:44 [PATCH] NAND: fsl_upm: fix build problem with 2.6.28-rc2 Wolfgang Grandegger
@ 2008-10-30 11:03 ` Anton Vorontsov
0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2008-10-30 11:03 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-dev, linux-mtd, David Woodhouse
On Thu, Oct 30, 2008 at 11:44:50AM +0100, Wolfgang Grandegger wrote:
> 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 <bigeasy@linutronix.de>
Date: Sun Oct 12 16:18:36 2008 +0200
[MTD] remove unused mtd parameter in of_mtd_parse_partitions()
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> 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);
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-30 11:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30 10:44 [PATCH] NAND: fsl_upm: fix build problem with 2.6.28-rc2 Wolfgang Grandegger
2008-10-30 11:03 ` Anton Vorontsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).