From patchwork Wed Jan 5 02:00:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 77565 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from canuck.infradead.org (canuck.infradead.org [134.117.69.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C13E5B710E for ; Wed, 5 Jan 2011 14:30:57 +1100 (EST) Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PaIfk-0008A4-J8; Wed, 05 Jan 2011 02:00:20 +0000 Received: from mail-ww0-f49.google.com ([74.125.82.49]) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PaIff-00089l-Sc for linux-mtd@lists.infradead.org; Wed, 05 Jan 2011 02:00:17 +0000 Received: by wwb17 with SMTP id 17so16361785wwb.18 for ; Tue, 04 Jan 2011 18:00:14 -0800 (PST) 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=K3Hfj1m7QLwa5qWEZFTLeK4zfO/wrwhtv9XT9B01A7k=; b=RugAL7VgXVF56ir6mjhGDL6j8ZGMGio2TEgq2siqFEC3kJQj0Wibmr6fENmcdCcXFO tFu/87RtDy3gJ/n7Ij4HBSc7SsZeb308LVpgOp5Aoe++ncDrjKQ1DTxfDk9/4WLzIzKd nq8q25Lub1eXrZZNYX+SGWSRxVptWvFg5/JoM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=niBjhc/8tqGUN1lvD6EFOGslfxrfwiy3H1huRW5E+rGHVJnhb5A0Osr/FZTciMMSij rE/ZzjWSDba1zRcx1nllHvAL0SIlu49BjTLWgsRxc8hmXqwTCmqm5errqbL4ucQg9xiC LzcKYEva+LNi8QjMFneG4g/Uj4S71TJJgbywk= Received: by 10.227.135.201 with SMTP id o9mr12986674wbt.34.1294192813901; Tue, 04 Jan 2011 18:00:13 -0800 (PST) Received: from doriath.ww600.siemens.net ([91.213.169.4]) by mx.google.com with ESMTPS id m10sm15544772wbc.22.2011.01.04.18.00.12 (version=SSLv3 cipher=RC4-MD5); Tue, 04 Jan 2011 18:00:12 -0800 (PST) From: Dmitry Eremin-Solenikov To: David Woodhouse Subject: [PATCH] physmap: fix mtdconcat support if physmap/mtdconcat were compiled as modules Date: Wed, 5 Jan 2011 05:00:13 +0300 Message-Id: <1294192813-23549-1-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 1.7.2.3 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110104_210016_178950_AB91D187 X-CRM114-Status: GOOD ( 12.86 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (dbaryshkov[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] -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 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 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 4c18b98..a224afc 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) && defined(CONFIG_MTD_PHYSMAP_MODULE)) if (info->cmtd != info->mtd[0]) mtd_concat_destroy(info->cmtd); #endif @@ -159,7 +159,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) && defined(CONFIG_MTD_PHYSMAP_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 9861814..ffa93e5 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -104,7 +104,7 @@ static int of_flash_remove(struct platform_device *dev) return 0; dev_set_drvdata(&dev->dev, NULL); -#ifdef CONFIG_MTD_CONCAT +#if defined(CONFIG_MTD_CONCAT) || (defined(CONFIG_MTD_CONCAT_MODULE) && defined(CONFIG_MTD_PHYSMAP_OF_MODULE)) if (info->cmtd != info->list[0].mtd) { del_mtd_device(info->cmtd); mtd_concat_destroy(info->cmtd); @@ -336,7 +336,7 @@ static int __devinit of_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) && defined(CONFIG_MTD_PHYSMAP_OF_MODULE)) info->cmtd = mtd_concat_create(mtd_list, info->list_size, dev_name(&dev->dev)); if (info->cmtd == NULL)