Skip to content

Commit

Permalink
samples: connector: from Documentation to samples directory
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
arndb authored and Jonathan Corbet committed Apr 28, 2016
1 parent 715cda7 commit 14fbff6
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions Documentation/connector/connector.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
9 changes: 9 additions & 0 deletions samples/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion samples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \
hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \
configfs/
configfs/ connector/
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 14fbff6

Please sign in to comment.