From: Arnd Bergmann <arnd@arndb.de>
To: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Christoph Hellwig <hch@lst.de>,
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 [thread overview]
Message-ID: <6271650.CdczvJuMsL@wuerfel> (raw)
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 <arnd@arndb.de>
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
next reply other threads:[~2015-10-12 14:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 14:14 Arnd Bergmann [this message]
2015-10-12 14:20 ` [PATCH] samples: build configfs sample on when enabled Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6271650.CdczvJuMsL@wuerfel \
--to=arnd@arndb.de \
--cc=hch@lst.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox