From patchwork Fri Jun 11 11:58:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 55313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.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 52B60B7D85 for ; Fri, 11 Jun 2010 22:00:54 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1ON2t1-0007V1-Oa; Fri, 11 Jun 2010 11:58:59 +0000 Received: from mail-vw0-f49.google.com ([209.85.212.49]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1ON2sy-0007U7-67 for linux-mtd@lists.infradead.org; Fri, 11 Jun 2010 11:58:57 +0000 Received: by vws7 with SMTP id 7so1217353vws.36 for ; Fri, 11 Jun 2010 04:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=CRzscOu7AEKH76q8nVH3x/HOZJUDsMkx4jJNSHfNyq0=; b=I1EMo1Jc18U/ntM6hxyXqZ2DOg5caAoIGcD9rrliSkqAbHZJsxyuqgoYVLoNt2oXvJ TkstmF0MpP1w+8XUAFjo8jzrLhl40nSf6PWSUFB40JYILFwhr9HZzGzyGuB5Wtof2LOj /CK0RFv9b+n1npChAuB6+dQmEpHv77ZyvQ/y0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=j7roF3Dzk9ZGmcY7Xw+/A9I/JDa68mHvC0uGfPM199odRoHdtVQWHmZtn0u1kh176y 1teM5jP8QUQPiUNpX+Rfp+tVpiwzGnlHISMHrP/RYTWO8X8M4w9FH9V/y8tU43oiqeHF vI5f0bOBehUtxByFKA4I5GXSxF+dfGK9+QdTY= Received: by 10.229.250.204 with SMTP id mp12mr1000544qcb.234.1276257533413; Fri, 11 Jun 2010 04:58:53 -0700 (PDT) Received: from doriath.ww600.siemens.net ([91.213.169.4]) by mx.google.com with ESMTPS id i10sm7106249qcb.23.2010.06.11.04.58.51 (version=SSLv3 cipher=RC4-MD5); Fri, 11 Jun 2010 04:58:52 -0700 (PDT) From: Dmitry Eremin-Solenikov To: David Woodhouse Subject: [PATCH] physmap: fix mtdconcat support if physmap/mtdconcat were compiled as modules Date: Fri, 11 Jun 2010 15:58:51 +0400 Message-Id: <1276257531-7566-1-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 1.7.1 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100611_075856_326996_78FCA2F6 X-CRM114-Status: GOOD ( 14.34 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.3.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (dbaryshkov[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Stefan Roese , linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 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 physmap/physmap_of contained compile-time check for mtd concatenation. However thos modules did not consider that mtd concatenation can be built as modules. Fix physmap/physmap_of to also support CONFIG_MTD_CONCAT=m Signed-off-by: Dmitry Eremin-Solenikov Cc: Stefan Roese --- drivers/mtd/maps/physmap.c | 4 ++-- drivers/mtd/maps/physmap_of.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index d9603f7..7750757 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c @@ -59,7 +59,7 @@ static int physmap_flash_remove(struct platform_device *dev) #else del_mtd_device(info->cmtd); #endif -#ifdef CONFIG_MTD_CONCAT +#if defined(CONFIG_MTD_CONCAT) || defined(CONFIG_MTD_CONCAT_MODULE) if (info->cmtd != info->mtd[0]) mtd_concat_destroy(info->cmtd); #endif @@ -155,7 +155,7 @@ static int physmap_flash_probe(struct platform_device *dev) /* * We detected multiple devices. Concatenate them together. */ -#ifdef CONFIG_MTD_CONCAT +#if defined(CONFIG_MTD_CONCAT) || defined(CONFIG_MTD_CONCAT_MODULE) info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev)); if (info->cmtd == NULL) err = -ENXIO; diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 101ee6e..8cb80e1 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -103,7 +103,7 @@ static int of_flash_remove(struct of_device *dev) return 0; dev_set_drvdata(&dev->dev, NULL); -#ifdef CONFIG_MTD_CONCAT +#if defined(CONFIG_MTD_CONCAT) || defined(CONFIG_MTD_CONCAT_MODULE) if (info->cmtd != info->list[0].mtd) { del_mtd_device(info->cmtd); mtd_concat_destroy(info->cmtd); @@ -292,7 +292,7 @@ static int __devinit of_flash_probe(struct of_device *dev, /* * We detected multiple devices. Concatenate them together. */ -#ifdef CONFIG_MTD_CONCAT +#if defined(CONFIG_MTD_CONCAT) || defined(CONFIG_MTD_CONCAT_MODULE) info->cmtd = mtd_concat_create(mtd_list, info->list_size, dev_name(&dev->dev)); if (info->cmtd == NULL)