From patchwork Thu Oct 30 10:44:50 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Grandegger X-Patchwork-Id: 6468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 085F4DDDD8 for ; Thu, 30 Oct 2008 21:40:33 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1KvUvE-0007Bb-Ks; Thu, 30 Oct 2008 10:38:36 +0000 Received: from mail-out.m-online.net ([212.18.0.10]) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1KvUvC-000790-TC for linux-mtd@lists.infradead.org; Thu, 30 Oct 2008 10:38:35 +0000 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 8162E1C00639; Thu, 30 Oct 2008 11:38:32 +0100 (CET) X-Auth-Info: EUJRqnGTKMvQXzFKcm41BVpPXHsmHKZvZqWdOpCDsDQ= X-Auth-Info: EUJRqnGTKMvQXzFKcm41BVpPXHsmHKZvZqWdOpCDsDQ= X-Auth-Info: EUJRqnGTKMvQXzFKcm41BVpPXHsmHKZvZqWdOpCDsDQ= X-Auth-Info: EUJRqnGTKMvQXzFKcm41BVpPXHsmHKZvZqWdOpCDsDQ= Received: from lancy.denx.de (p5496BF59.dip.t-dialin.net [84.150.191.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mnet-online.de (Postfix) with ESMTP id 5EF739004F; Thu, 30 Oct 2008 11:38:32 +0100 (CET) Message-ID: <49099022.40908@grandegger.com> Date: Thu, 30 Oct 2008 11:44:50 +0100 From: Wolfgang Grandegger User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: linux-mtd@lists.infradead.org Subject: [PATCH] NAND: fsl_upm: fix build problem with 2.6.28-rc2 X-Enigmail-Version: 0.95.7 X-Spam-Score: 0.0 (/) Cc: linuxppc-dev@ozlabs.org, Anton Vorontsov , David Woodhouse X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 Acked-by: Anton Vorontsov 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);