On 10/17/2016 02:41 AM, Robert P. J. Day wrote:
more nitpicking pedantry ... reading watchdog-kernel-api.txt, which claims: "Each watchdog timer driver that wants to use the WatchDog Timer Driver Core must #include <linux/watchdog.h> (you would have to do this anyway when writing a watchdog device driver)." except i just noticed the following -- kernel files that include <asm/watchdog.h>: $ grep -r "include.*asm/watchdog.h" * arch/sh/boards/mach-hp6xx/pm.c:#include <asm/watchdog.h> arch/sh/kernel/reboot.c:#include <asm/watchdog.h>
If you look more closely, you'll notice that yhe above two files may use functionality associated with kernel/watchdog.c and/or use definitions and/or functions defined in the asm include. They do not implement watchdog drivers associated with drivers/watchdog.
drivers/watchdog/shwdt.c:#include <asm/watchdog.h> drivers/watchdog/cpwd.c:#include <asm/watchdog.h> $ that last file, cpwd.c, includes just: #include <asm/watchdog.h> while the file shwdt.c includes *both*: #include <linux/watchdog.h> ... #include <asm/watchdog.h> i readily admit i have no idea why this is being done, or if there's a perfectly good reason that SH needs to be treated a bit differently; just pointing out that the claim in that Doc file is not entirely accurate for those cases.
Check the source. I would guess that those two drivers use definitions and/or functions from the asm include files. The latter file hasn't been converted to use the watchdog infrastructure. Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html