From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbbJLOO2 (ORCPT ); Mon, 12 Oct 2015 10:14:28 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:50292 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751697AbbJLOOY (ORCPT ); Mon, 12 Oct 2015 10:14:24 -0400 From: Arnd Bergmann To: Nicholas Bellinger Cc: Christoph Hellwig , target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] samples: build configfs sample on when enabled Date: Mon, 12 Oct 2015 16:14:16 +0200 Message-ID: <6271650.CdczvJuMsL@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Fptq/IWSDfCs14aR7pgdY0muna+X1+T3TjhxWnTow3+ueVyV56e n47pxYeLNNcZNRsIPXl0yKMhaPfZ6VigWf9zi6sH7oAYaq6fJaGN8o8Awz/7HDSf6x77bOS kV7eUx1O09WFDU0TU8NlWdj66qvHCWe/mQSd7YUyJyHzn//oB6v1YElyvxwSiSXOsCPCwDg Tf4aUyTwZh+oEKDjdKxBQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:jmzirg3BULE=:H2nsjNmSZCfnJRQ03K6csp mTkySSKiB83Fxbh2cU9wlbjmHJfu2BQ7VM6HIHFyx0oBXQja138ZIfrcOLZ+vG4zh4bYXPcZV bAUmKHjEGaiFJB6f/z5u/Ca6qsix6U0kYZDkKgCKIsSEZR6NwaDoUO7aNDT/xWENiyWeTckZD EcQJ2/h/RwD3z+BQxXwIu8GM9+fHKH9BZCXTjsFhQcRuEbuUgj1dbhZYX1qcRyXEmFL2196Ge /DIK2gUOxqE1/HVIbSu5JvMiYJtULeDIoYpqU+JbDfnYlR0C4hk2156WtcZoRpReXlouOAjdF HEy53w8jeqWpi+agxKJPKOBocKCqBscYtNqDGrbMLbTl9Oty4IS/N/1Qpnkfjzn/j0k2XWHH4 wTH1Gi7UVzejt/rhuaA2I7DJsr/Vov3nK/CAHasPzFWix9Tbe6ceqMLDtjBB/DrCQr1MAZnw7 0Dq2N+KyBwDdb1QYnktKk4HvBQZ+ShX2D7AgV7YtwZNVE0L0e3xKdlmiOwYVyjMLd+zq9QnHW ygWtCwLyyNL+ryYiOYV4pbBLuqpk4CY0PhGGnnvtQ6X1Au8bn+6NgAgSLN2rX+niCO4G/UEAH tehdyCKlXareNd9uBHtwwbuxs1/e0sVGJJtx8DyDD+XWy8nlBXlM7SfhwqjLWGEIk+6HpUuBh E0xvd27Zqm9ZOYQo2Fgz+VbY+s9hnIqNj6rY9Ub99cekXkYkHQEHsJleGFDsHwHLjkoQqzlpU b2kQaHwuynPfKsRs Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Most samples have their own Kconfig option, but for some reason the configfs sample does not have one and gets built unconditionally when CONFIG_SAMPLES is enabled, which fails if CONFIG_CONFIGFS_FS is not: ERROR: "configfs_unregister_subsystem" [samples/configfs/configfs_sample.ko] undefined! ERROR: "configfs_register_subsystem" [samples/configfs/configfs_sample.ko] undefined! This adds a new Kconfig symbol to mirror the existing method and only let the user enable this sample if configfs is present. Signed-off-by: Arnd Bergmann diff --git a/samples/Kconfig b/samples/Kconfig index fbd55eefa418..b283dc2e8ed6 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -5,6 +5,12 @@ menuconfig SAMPLES if SAMPLES +config SAMPLE_CONFIGFS + tristate "Build configfs sample -- loadable modules only" + depends on CONFIGFS_FS && m + help + This builds the same for configfs + config SAMPLE_TRACE_EVENTS tristate "Build trace_events examples -- loadable modules only" depends on EVENT_TRACING && m diff --git a/samples/configfs/Makefile b/samples/configfs/Makefile index 4d3c8b668f06..b9153ed0b7d6 100644 --- a/samples/configfs/Makefile +++ b/samples/configfs/Makefile @@ -1,2 +1 @@ - -obj-m += configfs_sample.o +obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs_sample.o