summaryrefslogtreecommitdiffstats
path: root/include/linux/watchdog.h
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-05-10 21:48:59 +0200
committerWim Van Sebroeck <wim@iguana.be>2012-05-30 07:54:25 +0200
commit45f5fed30a6460ec58f159ff297a2974153a97de (patch)
treed173b2d22ed1187fb7ed2cb85015ddf5c545da05 /include/linux/watchdog.h
parentfb5f6658163412dce22724e906e324ab7fd62c18 (diff)
downloadop-kernel-dev-45f5fed30a6460ec58f159ff297a2974153a97de.zip
op-kernel-dev-45f5fed30a6460ec58f159ff297a2974153a97de.tar.gz
watchdog: Add multiple device support
We keep the old /dev/watchdog interface file for the first watchdog via miscdev. This is basically a cut and paste of the relevant interface code from the rtc driver layer tweaked for watchdog. Revised to fix problems noted by Hans de Goede Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'include/linux/watchdog.h')
-rw-r--r--include/linux/watchdog.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index 1984ea6..508d563 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -54,6 +54,8 @@ struct watchdog_info {
#ifdef __KERNEL__
#include <linux/bitops.h>
+#include <linux/device.h>
+#include <linux/cdev.h>
struct watchdog_ops;
struct watchdog_device;
@@ -89,6 +91,8 @@ struct watchdog_ops {
/** struct watchdog_device - The structure that defines a watchdog device
*
+ * @id: The watchdog's ID. (Allocated by watchdog_register_device)
+ * @cdev: The watchdog's Character device.
* @info: Pointer to a watchdog_info structure.
* @ops: Pointer to the list of watchdog operations.
* @bootstatus: Status of the watchdog device at boot.
@@ -105,6 +109,8 @@ struct watchdog_ops {
* via the watchdog_set_drvdata and watchdog_get_drvdata helpers.
*/
struct watchdog_device {
+ int id;
+ struct cdev cdev;
const struct watchdog_info *info;
const struct watchdog_ops *ops;
unsigned int bootstatus;
OpenPOWER on IntegriCloud