linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] samples: build configfs sample on when enabled
@ 2015-10-12 14:14 Arnd Bergmann
  2015-10-12 14:20 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2015-10-12 14:14 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] samples: build configfs sample on when enabled
  2015-10-12 14:14 [PATCH] samples: build configfs sample on when enabled Arnd Bergmann
@ 2015-10-12 14:20 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2015-10-12 14:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 12, 2015 at 04:14:16PM +0200, Arnd Bergmann wrote:
> 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>

This should already be in version two of the series I sent last week.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-12 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-12 14:14 [PATCH] samples: build configfs sample on when enabled Arnd Bergmann
2015-10-12 14:20 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).