summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/Makefile2
-rw-r--r--Documentation/connector/connector.txt8
-rw-r--r--samples/Kconfig9
-rw-r--r--samples/Makefile2
-rw-r--r--samples/connector/.gitignore (renamed from Documentation/connector/.gitignore)0
-rw-r--r--samples/connector/Makefile (renamed from Documentation/connector/Makefile)6
-rw-r--r--samples/connector/cn_test.c (renamed from Documentation/connector/cn_test.c)0
-rw-r--r--samples/connector/ucon.c (renamed from Documentation/connector/ucon.c)0
8 files changed, 22 insertions, 5 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 1207d7907650..13b5ae1b87aa 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -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
diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt
index f6215f95149b..ab7ca897fab7 100644
--- a/Documentation/connector/connector.txt
+++ b/Documentation/connector/connector.txt
@@ -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.
diff --git a/samples/Kconfig b/samples/Kconfig
index d54f28c6dc5e..559a58baff6e 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -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
diff --git a/samples/Makefile b/samples/Makefile
index 48001d7e23f0..594ef7d9fa2a 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -2,4 +2,4 @@
obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \
hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \
- configfs/
+ configfs/ connector/
diff --git a/Documentation/connector/.gitignore b/samples/connector/.gitignore
index d2b9c32accd4..d2b9c32accd4 100644
--- a/Documentation/connector/.gitignore
+++ b/samples/connector/.gitignore
diff --git a/Documentation/connector/Makefile b/samples/connector/Makefile
index d98e4df98e24..04b9622b6f51 100644
--- a/Documentation/connector/Makefile
+++ b/samples/connector/Makefile
@@ -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)
diff --git a/Documentation/connector/cn_test.c b/samples/connector/cn_test.c
index d12cc944b696..d12cc944b696 100644
--- a/Documentation/connector/cn_test.c
+++ b/samples/connector/cn_test.c
diff --git a/Documentation/connector/ucon.c b/samples/connector/ucon.c
index 8a4da64e02a8..8a4da64e02a8 100644
--- a/Documentation/connector/ucon.c
+++ b/samples/connector/ucon.c