Re: curious about a couple examples of drivers including <asm/watchdog.h>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux