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

samples: move watchdog example code from Documentation

Move watchdog examples to samples and remove it from Documentation
Makefile. Create a new Makefile to build watchdog. It can be built
from top level directory or from watchdog directory:

Run make -C samples/watchdog or cd samples/watchdog; make

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

+11 -9
+1 -1
Documentation/Makefile
··· 1 1 subdir-y := accounting auxdisplay blackfin \ 2 - laptops pcmcia watchdog 2 + laptops pcmcia
-1
Documentation/watchdog/Makefile
··· 1 - subdir-y := src
Documentation/watchdog/src/.gitignore samples/watchdog/.gitignore
-5
Documentation/watchdog/src/Makefile
··· 1 - # List of programs to build 2 - hostprogs-y := watchdog-simple 3 - 4 - # Tell kbuild to always build the programs 5 - always := $(hostprogs-y)
Documentation/watchdog/src/watchdog-simple.c samples/watchdog/watchdog-simple.c
+1 -1
Documentation/watchdog/watchdog-api.txt
··· 37 37 the watchdog is pinged within a certain time, this time is called the 38 38 timeout or margin. The simplest way to ping the watchdog is to write 39 39 some data to the device. So a very simple watchdog daemon would look 40 - like this source file: see Documentation/watchdog/src/watchdog-simple.c 40 + like this source file: see samples/watchdog/watchdog-simple.c 41 41 42 42 A more advanced driver could for example check that a HTTP server is 43 43 still responding before doing the write call to ping the watchdog.
+1 -1
Documentation/watchdog/wdt.txt
··· 47 47 Minor numbers are however allocated for it. 48 48 49 49 50 - Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c 50 + Example Watchdog Driver: see samples/watchdog/watchdog-simple.c
+8
samples/watchdog/Makefile
··· 1 + CC := $(CROSS_COMPILE)gcc 2 + PROGS := watchdog-simple 3 + 4 + all: $(PROGS) 5 + 6 + clean: 7 + rm -fr $(PROGS) 8 +