samples: connector: from Documentation to samples directory

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>
This commit is contained in:
Arnd Bergmann 2016-04-25 18:03:08 +02:00 committed by Jonathan Corbet
parent 715cda787c
commit 14fbff6b4e
8 changed files with 22 additions and 5 deletions

View 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

View 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.

View 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

View File

@ -2,4 +2,4 @@
obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \
hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \
configfs/
configfs/ connector/

View 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)