Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arnd Bergmann and committed by
Jonathan Corbet
14fbff6b 715cda78

+22 -5
+1 -1
Documentation/Makefile
··· 1 - subdir-y := accounting auxdisplay blackfin connector \ 1 + subdir-y := accounting auxdisplay blackfin \ 2 2 filesystems filesystems ia64 laptops mic misc-devices \ 3 3 networking pcmcia prctl ptp timers vDSO video4linux \ 4 4 watchdog
Documentation/connector/.gitignore samples/connector/.gitignore
+3 -3
Documentation/connector/Makefile samples/connector/Makefile
··· 1 - ifneq ($(CONFIG_CONNECTOR),) 2 - obj-m += cn_test.o 3 - endif 1 + obj-$(CONFIG_SAMPLE_CONNECTOR) += cn_test.o 4 2 5 3 # List of programs to build 4 + ifdef CONFIG_SAMPLE_CONNECTOR 6 5 hostprogs-y := ucon 6 + endif 7 7 8 8 # Tell kbuild to always build the programs 9 9 always := $(hostprogs-y)
Documentation/connector/cn_test.c samples/connector/cn_test.c
+8
Documentation/connector/connector.txt
··· 186 186 Some work in netlink area is still being done, so things can be changed in 187 187 2.6.15 timeframe, if it will happen, documentation will be updated for that 188 188 kernel. 189 + 190 + /*****************************************/ 191 + Code samples 192 + /*****************************************/ 193 + 194 + Sample code for a connector test module and user space can be found 195 + in samples/connector/. To build this code, enable CONFIG_CONNECTOR 196 + and CONFIG_SAMPLES.
Documentation/connector/ucon.c samples/connector/ucon.c
+9
samples/Kconfig
··· 76 76 help 77 77 Builds a sample configfs interface. 78 78 79 + config SAMPLE_CONNECTOR 80 + tristate "Build connector sample -- loadable modules only" 81 + depends on CONNECTOR && m 82 + help 83 + When enabled, this builds both a sample kernel module for 84 + the connector interface and a user space tool to communicate 85 + with it. 86 + See also Documentation/connector/connector.txt 87 + 79 88 endif # SAMPLES
+1 -1
samples/Makefile
··· 2 2 3 3 obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ 4 4 hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ 5 - configfs/ 5 + configfs/ connector/