]> git.karo-electronics.de Git - linux-beck.git/commitdiff
samples: connector: from Documentation to samples directory
authorArnd Bergmann <arnd@arndb.de>
Mon, 25 Apr 2016 16:03:08 +0000 (18:03 +0200)
committerJonathan Corbet <corbet@lwn.net>
Thu, 28 Apr 2016 13:47:35 +0000 (07:47 -0600)
A small bug with the new autoksyms support showed that there are
two kernel modules in the Documentation directory that qualify
as samples, while all other samples are in the samples/ directory.

This patch was originally meant as a workaround for that bug, but
it has now been solved in a different way. However, I still think
it makes sense as a cleanup to consolidate all sample code in
one place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/Makefile
Documentation/connector/connector.txt
samples/Kconfig
samples/Makefile
samples/connector/.gitignore [moved from Documentation/connector/.gitignore with 100% similarity]
samples/connector/Makefile [moved from Documentation/connector/Makefile with 76% similarity]
samples/connector/cn_test.c [moved from Documentation/connector/cn_test.c with 100% similarity]
samples/connector/ucon.c [moved from Documentation/connector/ucon.c with 100% similarity]

index 1207d7907650028927809c57c274d3cb962337c4..13b5ae1b87aa50d068cf74e0815e7e364a37ec25 100644 (file)
@@ -1,4 +1,4 @@
-subdir-y := accounting auxdisplay blackfin connector \
+subdir-y := accounting auxdisplay blackfin \
        filesystems filesystems ia64 laptops mic misc-devices \
        networking pcmcia prctl ptp timers vDSO video4linux \
        watchdog
index f6215f95149b4dafc545ec6b0c1e9421ef34403d..ab7ca897fab7ee5ada0ac87992065d550e969508 100644 (file)
@@ -186,3 +186,11 @@ only cn_test.c test module used it.
 Some work in netlink area is still being done, so things can be changed in
 2.6.15 timeframe, if it will happen, documentation will be updated for that
 kernel.
+
+/*****************************************/
+Code samples
+/*****************************************/
+
+Sample code for a connector test module and user space can be found
+in samples/connector/. To build this code, enable CONFIG_CONNECTOR
+and CONFIG_SAMPLES.
index d54f28c6dc5e5450595f1d5472f14cad3c42cee9..559a58baff6ea5be2915ea6ed551a10c7adf3877 100644 (file)
@@ -76,4 +76,13 @@ config SAMPLE_CONFIGFS
        help
          Builds a sample configfs interface.
 
+config SAMPLE_CONNECTOR
+       tristate "Build connector sample -- loadable modules only"
+       depends on CONNECTOR && m
+       help
+         When enabled, this builds both a sample kernel module for
+         the connector interface and a user space tool to communicate
+         with it.
+         See also Documentation/connector/connector.txt
+
 endif # SAMPLES
index 48001d7e23f042a7f777ec810ab2ff29e7db5f52..594ef7d9fa2ade558b4cf4451701b3f0ba30006d 100644 (file)
@@ -2,4 +2,4 @@
 
 obj-$(CONFIG_SAMPLES)  += kobject/ kprobes/ trace_events/ livepatch/ \
                           hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \
-                          configfs/
+                          configfs/ connector/
similarity index 76%
rename from Documentation/connector/Makefile
rename to samples/connector/Makefile
index d98e4df98e249762394ee6be0833de4b6c5ad87f..04b9622b6f515082a15f021a41e71b9223e14bae 100644 (file)
@@ -1,9 +1,9 @@
-ifneq ($(CONFIG_CONNECTOR),)
-obj-m += cn_test.o
-endif
+obj-$(CONFIG_SAMPLE_CONNECTOR) += cn_test.o
 
 # List of programs to build
+ifdef CONFIG_SAMPLE_CONNECTOR
 hostprogs-y := ucon
+endif
 
 # Tell kbuild to always build the programs
 always := $(hostprogs-y)