From patchwork Wed Jan 7 02:40:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 17070 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 E7E92474E4 for ; Wed, 7 Jan 2009 19:50:29 +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 1LKU4o-000770-DV; Wed, 07 Jan 2009 08:47:46 +0000 Received: from vpn.static.83-173-204-231.cybernet.ch ([83.173.204.231] helo=localhost.localdomain) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1LKOfJ-0003mG-8t for linux-mtd@lists.infradead.org; Wed, 07 Jan 2009 03:01:05 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3) with ESMTP id n072gsc4002541; Wed, 7 Jan 2009 03:43:10 +0100 Received: (from sumo@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id n072gsgR002540; Wed, 7 Jan 2009 03:42:54 +0100 From: Marcel Ziswiler To: linux-mtd@lists.infradead.org Subject: [PATCH 3/3] Fix compilation without MTD partitioning support Date: Wed, 7 Jan 2009 03:40:53 +0100 Message-Id: <1231296053-2378-4-git-send-email-marcel@ziswiler.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1231296053-2378-3-git-send-email-marcel@ziswiler.com> References: <1231296053-2378-1-git-send-email-marcel@ziswiler.com> <1231296053-2378-2-git-send-email-marcel@ziswiler.com> <1231296053-2378-3-git-send-email-marcel@ziswiler.com> X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-Spam-Score: 4.1 (++++) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (4.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 2.9 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL [83.173.204.231 listed in zen.spamhaus.org] 0.8 HELO_LH_LD HELO_LH_LD 0.4 SUBJECT_FUZZY_TION Attempt to obfuscate words in Subject: X-Mailman-Approved-At: Wed, 07 Jan 2009 03:47:44 -0500 Cc: eric.y.miao@gmail.com, Marcel Ziswiler 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. Signed-off-by: Marcel Ziswiler --- drivers/mtd/nand/pxa3xx_nand.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index d2da717..90cadc9 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -1162,7 +1162,11 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) goto fail_free_irq; } +#ifdef CONFIG_MTD_PARTITIONS return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts); +#else + return 0; +#endif fail_free_irq: free_irq(IRQ_NAND, info); @@ -1193,7 +1197,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);