Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752019AbcDYXFy (ORCPT ); Mon, 25 Apr 2016 19:05:54 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:51312 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbcDYXFw (ORCPT ); Mon, 25 Apr 2016 19:05:52 -0400 From: Arnd Bergmann To: David Woodhouse , Brian Norris , Linus Walleij , Arnd Bergmann Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] physmap_of: ensure versatile code is reachable Date: Tue, 26 Apr 2016 01:04:38 +0200 Message-Id: <1461625501-2160538-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:9x4/q6fiPOh6Is1+IsQeNjB23k55KkWzimamPg7NosXIpaUBUlT S/gupyCbPl1oZgpS0tsqwvHdtc8ojNE8f8Dcob0IdmwtyNsC2QCvCe7kHDxzHNv7tpaHrLf jmoA1iygfx/OUO1LxiA7/jujoAfiIyyBjVexqBnxuA6PRVT15nNfLfN/hrwbTDMalJkG60/ AMUdDQjXx8luYJG6hvvtA== X-UI-Out-Filterresults: notjunk:1;V01:K0:b34jSUoWEZ4=:RhDac9Hy+B6WCPMP9nGMTA SWgrOyjzjVzVCTY8sqkrNaYDWqeianYJBvYSBd32zHRomNSmzD9fwlw+jl0ZAn+OIxKFaiF1w oYT2vieZdkMrxxAD98rulKhbXyemVUAGnnfJo74JPv7sxtvjKAQW+aMxIRAvynB6Bf9s61rnu R5SWcpHAWM6Aabj2pz5wPjaEGjiDsmQ2Lj4uSqtn0MgWCpEGRvSi9LJag8QvMwsoD1u+CSRDf x0xBoTxuuV85BUwBOM9u3BEoG3bBmdj9wMSrYIq3UYh/ligC54A19MdAq0qWNy/3ygwSL8tIQ KnCoV+nUbRXMgVwL+0zkRVQGWEvfqvy1NEy1xg3FIiexG74eBlErophCOC6xWACpf8IOqBt/4 cDNSR1nnVJ+ef1uKp10qM14MH6jCg3ThleG/2djyY9BNBuVerunCmbosleAAz7zgYFixpoAD3 XmK15EvZP6GA1xJWtbKu/+ZMrWkZxh29kvCT0L4bTII4gcoti+seub+6EYocP9a6Q2bjTK8eW QVvTbnfppO+1EVcNJJkGCARPbrecclOxcOI2XlEYrBl3S4VHcAwSrMeZfFDGL4TRJ67Sixd0l L9TzXyv8iSmMqYxE48gbqRXtNMrBNhg4m1Cx9YcniP1+zStwsprn2LdWvyXSeGWo6d9qhDeKj SYZ0Jc0TE9+LyhaF8KtjjyK/0fprDS8Qf6Y7zPqeYkUw1Mh9RnaQRNEoKwY5OY6SLu0E= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1812 Lines: 50 With the newly added physmap_of_versatile code, we get a build error when physmap_of is in a module, because of_flash_probe_versatile is not exported: ERROR: "of_flash_probe_versatile" [drivers/mtd/maps/physmap_of.ko] undefined! This adds the export, and changes the Makefile so that the code is also put into a loadable module rather than built-in when physmap_of itself is a module. Signed-off-by: Arnd Bergmann --- drivers/mtd/maps/Makefile | 4 +++- drivers/mtd/maps/physmap_of_versatile.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile index 188873a..644f7d3 100644 --- a/drivers/mtd/maps/Makefile +++ b/drivers/mtd/maps/Makefile @@ -18,7 +18,9 @@ obj-$(CONFIG_MTD_TSUNAMI) += tsunami_flash.o obj-$(CONFIG_MTD_PXA2XX) += pxa2xx-flash.o obj-$(CONFIG_MTD_PHYSMAP) += physmap.o obj-$(CONFIG_MTD_PHYSMAP_OF) += physmap_of.o -obj-$(CONFIG_MTD_PHYSMAP_OF_VERSATILE) += physmap_of_versatile.o +ifdef CONFIG_MTD_PHYSMAP_OF_VERSATILE +obj-$(CONFIG_MTD_PHYSMAP_OF) += physmap_of_versatile.o +endif obj-$(CONFIG_MTD_PISMO) += pismo.o obj-$(CONFIG_MTD_PMC_MSP_EVM) += pmcmsp-flash.o obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o diff --git a/drivers/mtd/maps/physmap_of_versatile.c b/drivers/mtd/maps/physmap_of_versatile.c index fa40539..0f39b2a 100644 --- a/drivers/mtd/maps/physmap_of_versatile.c +++ b/drivers/mtd/maps/physmap_of_versatile.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include #include #include #include @@ -251,3 +252,4 @@ int of_flash_probe_versatile(struct platform_device *pdev, return 0; } +EXPORT_SYMBOL_GPL(of_flash_probe_versatile); -- 2.7.0