From patchwork Thu Jan 8 22:38:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 17466 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 8F90647534 for ; Fri, 9 Jan 2009 15:20:12 +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 1LL8oo-0004Dg-2q; Fri, 09 Jan 2009 04:17:58 +0000 Received: from mout.perfora.net ([74.208.4.195]) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1LL3X4-0001u0-2j for linux-mtd@lists.infradead.org; Thu, 08 Jan 2009 22:39:18 +0000 Received: from localhost.localdomain (pub082136091071.dh-hfc.datazug.ch [82.136.91.71]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1LL3Wk3yFb-0007fK; Thu, 08 Jan 2009 17:39:04 -0500 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3) with ESMTP id n08Mcvw0004474; Thu, 8 Jan 2009 23:38:57 +0100 Received: (from sumo@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id n08Mcvnu004472; Thu, 8 Jan 2009 23:38:57 +0100 From: Marcel Ziswiler To: linux-mtd@lists.infradead.org Subject: [PATCH 3/3 v2] [MTD] [NAND] pxa3xx_nand.c: Fix compilation without MTD partitioning support Date: Thu, 8 Jan 2009 23:38:56 +0100 Message-Id: <1231454336-4430-4-git-send-email-marcel@ziswiler.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1231454336-4430-3-git-send-email-marcel@ziswiler.com> References: <1231454336-4430-1-git-send-email-marcel@ziswiler.com> <1231454336-4430-2-git-send-email-marcel@ziswiler.com> <1231454336-4430-3-git-send-email-marcel@ziswiler.com> X-Provags-ID: V01U2FsdGVkX1+KWVMOyvjqRcSDqmCW5fcmtITbH5egl+KlJLs zu+Ptsw0M17piFoe4w9mMPQ1BK5a7dDL96SBloTiwrqe3G0SQr Ys5sd6kRCHGRZcIKlkADHEJZ2b8EVBP X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 SUBJECT_FUZZY_TION Attempt to obfuscate words in Subject: X-Mailman-Approved-At: Thu, 08 Jan 2009 23:17:55 -0500 Cc: Marcel Ziswiler , eric.y.miao@gmail.com, Marcel Ziswiler , LW@KARO-electronics.de 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: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This fixes compilation without MTD partitioning support previously failing. Acked-by: Eric Miao Signed-off-by: Marcel Ziswiler --- drivers/mtd/nand/pxa3xx_nand.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 45122ab..04ba7be 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -1161,7 +1161,10 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) goto fail_free_irq; } - return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts); +#ifdef CONFIG_MTD_PARTITIONS + ret = add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts); +#endif + return ret; fail_free_irq: free_irq(IRQ_NAND, info); @@ -1192,7 +1195,9 @@ static int pxa3xx_nand_remove(struct platform_device *pdev) platform_set_drvdata(pdev, NULL); del_mtd_device(mtd); +#ifdef CONFIG_MTD_PARTITIONS del_mtd_partitions(mtd); +#endif free_irq(IRQ_NAND, info); if (use_dma) { pxa_free_dma(info->data_dma_ch);