From patchwork Sun Mar 26 12:27:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 96009 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp812430qgd; Sun, 26 Mar 2017 05:28:28 -0700 (PDT) X-Received: by 10.98.155.28 with SMTP id r28mr19042463pfd.212.1490531307911; Sun, 26 Mar 2017 05:28:27 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id d83si6613060pfj.232.2017.03.26.05.28.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Mar 2017 05:28:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=W9qFyhHeVQBHFKb1ua1N1IndUYShVaRvF2N02UTVD/o=; b=DlY AmLoXCvQhuyyP5JMr17mme+ZmsR7dvdK6wc1+eOm8HzzEPM9MXNnXhbpbx6doWmE7flyDPONGBZN4 eKfvPBNw+5qewkfk2lJXGhDrcZQiR+qIcd8JrweAXuWs/1Xpbsxwd21Vj+iJtrvlpXNVFYvWcpu7t r6vDJ2OtD0QWMIwEHFulcg2ddkKYhmdR9s+YpD33p8TBvy23/SMPvM9b7uJ/mhcoDDAqU5LPeTpZD qPTIFhxv9dV7Sq1QdgbgpCWfzcICQ+3HAoGW3659Zijl9O/5/VwWTlEDDSkt8+1LLdZrCI4DO7sx8 qWQ2g3fRHBYDTthq0AChRnOAz0jHlzQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cs7HR-0007QP-0r; Sun, 26 Mar 2017 12:28:21 +0000 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cs7HO-0007On-2K for linux-mtd@lists.infradead.org; Sun, 26 Mar 2017 12:28:19 +0000 Received: by mail-lf0-x22a.google.com with SMTP id h125so9904037lfe.0 for ; Sun, 26 Mar 2017 05:27:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=P3QBuY1rsjARhs6tVanxqmc6BAP9slU2RFfMFOZnHdQ=; b=jU9xXGEPQ3x+rSISKx8RGdn044Wac3Y78X9z6sMLgrj8yFKhZKFyJ3mlp5/C3wVSh1 LKQYAd/R2KrJqixxTlLukEQcnOsdRzz78c32GAQ6tjbPit4+iduODZq2NsmL9DJkCzK3 kuQK4woCfhgjPl/BdzAk1au6VJ3R1N7E151Bc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=P3QBuY1rsjARhs6tVanxqmc6BAP9slU2RFfMFOZnHdQ=; b=lraEwQBYpgWeLdPmHivX3p5o34XypbvdK3DmHGPsv0YjYFY7rVCGwajh90CC7Wi/C2 b6mFX7gMZ5hc1LQ/Bx/91kD+rTVvIZyJlUSAXOmJMLMxv2FAFJ/w48qLGtjVWaQwNopT PPpq/SptyzJqDv+ap4PKCdAshqmi8dpZ2IQ2PXqNh8KtlRUcqX5IYrrYmODZ98remOB7 Ucm60B2gfHkpqiA0vOq2E2NUj5HmOXb8P+RaGs+nXUptvKi+DqufNwPJmCKfz0I4BEAK J3z+UofQ0qqSyHYrrFY8kRqAVAM/Y9a23dbD37UWz48jaHvXpasoe+5krIFuQOUrSRzn XZbw== X-Gm-Message-State: AFeK/H3zIdlTFWn5EH1/zNGW1wdupiUr3vTJSmIku4iv6e+bpu1L2Cl5cJtSsupvDCCq7uCN X-Received: by 10.25.227.5 with SMTP id a5mr9052568lfh.118.1490531275081; Sun, 26 Mar 2017 05:27:55 -0700 (PDT) Received: from localhost.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id d72sm1379493lfe.58.2017.03.26.05.27.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Mar 2017 05:27:53 -0700 (PDT) From: Linus Walleij To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , linux-mtd@lists.infradead.org Subject: [PATCH] mtd: physmap_of: really fix the physmap add-ons Date: Sun, 26 Mar 2017 14:27:25 +0200 Message-Id: <20170326122725.5594-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170326_052818_301709_90D492A3 X-CRM114-Status: GOOD ( 14.56 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -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 X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org The current way of building the of_physmap add-ons result in just the add-on being in the object code, and not the actual core implementation and regress the Gemini and Versatile. There is no way around exporting these functions. If they are built as modules, they will become modules with exported functions, if they are builtins they will become builtins. Fixes: 4f04f68e1598 ("mtd: physmap_of: fixup gemini/versatile dependencies") Signed-off-by: Linus Walleij --- The previous attempts to bake a single module from several *optional* pieces doesn't play well with tristate, and if there is a way to achieve that except making everything an #ifdef in the same file, I sure haven't figured it out. I guess #include "physmap_addon.c" directly into the C file would work but ugh that is ugly. --- drivers/mtd/maps/Makefile | 8 ++------ drivers/mtd/maps/physmap_of_gemini.c | 2 ++ drivers/mtd/maps/physmap_of_versatile.c | 2 ++ 3 files changed, 6 insertions(+), 6 deletions(-) -- 2.9.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index aef1846b4de2..608bdd37ac99 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile @@ -17,12 +17,8 @@ obj-$(CONFIG_MTD_CK804XROM) += ck804xrom.o obj-$(CONFIG_MTD_TSUNAMI) += tsunami_flash.o obj-$(CONFIG_MTD_PXA2XX) += pxa2xx-flash.o obj-$(CONFIG_MTD_PHYSMAP) += physmap.o -ifdef CONFIG_MTD_PHYSMAP_OF_VERSATILE -physmap_of-objs += physmap_of_versatile.o -endif -ifdef CONFIG_MTD_PHYSMAP_OF_GEMINI -physmap_of-objs += physmap_of_gemini.o -endif +obj-$(CONFIG_MTD_PHYSMAP_OF_VERSATILE) += physmap_of_versatile.o +obj-$(CONFIG_MTD_PHYSMAP_OF_GEMINI) += physmap_of_gemini.o obj-$(CONFIG_MTD_PHYSMAP_OF) += physmap_of.o obj-$(CONFIG_MTD_PISMO) += pismo.o obj-$(CONFIG_MTD_PMC_MSP_EVM) += pmcmsp-flash.o diff --git a/drivers/mtd/maps/physmap_of_gemini.c b/drivers/mtd/maps/physmap_of_gemini.c index 9d371cd728ea..616f162c4da1 100644 --- a/drivers/mtd/maps/physmap_of_gemini.c +++ b/drivers/mtd/maps/physmap_of_gemini.c @@ -6,6 +6,7 @@ * detect and set it up when booting on this platform. */ #include +#include #include #include #include @@ -115,3 +116,4 @@ int of_flash_probe_gemini(struct platform_device *pdev, return 0; } +EXPORT_SYMBOL(of_flash_probe_gemini); diff --git a/drivers/mtd/maps/physmap_of_versatile.c b/drivers/mtd/maps/physmap_of_versatile.c index 8c6ccded9be8..0583876bc053 100644 --- a/drivers/mtd/maps/physmap_of_versatile.c +++ b/drivers/mtd/maps/physmap_of_versatile.c @@ -21,6 +21,7 @@ */ #include #include +#include #include #include #include @@ -252,3 +253,4 @@ int of_flash_probe_versatile(struct platform_device *pdev, return 0; } +EXPORT_SYMBOL(of_flash_probe_versatile);