summaryrefslogtreecommitdiff
path: root/drivers/watchdog/watchdog_pretimeout.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/watchdog_pretimeout.c')
-rw-r--r--drivers/watchdog/watchdog_pretimeout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/watchdog/watchdog_pretimeout.c b/drivers/watchdog/watchdog_pretimeout.c
index e5295c990fa1..19eb2ed2c7cb 100644
--- a/drivers/watchdog/watchdog_pretimeout.c
+++ b/drivers/watchdog/watchdog_pretimeout.c
@@ -7,6 +7,8 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
+#include <linux/sysfs.h>
+#include <linux/types.h>
#include <linux/watchdog.h>
#include "watchdog_core.h"
@@ -117,7 +119,7 @@ int watchdog_register_governor(struct watchdog_governor *gov)
struct watchdog_pretimeout *p;
struct governor_priv *priv;
- priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
@@ -181,7 +183,7 @@ int watchdog_register_pretimeout(struct watchdog_device *wdd)
if (!watchdog_have_pretimeout(wdd))
return 0;
- p = kzalloc(sizeof(*p), GFP_KERNEL);
+ p = kzalloc_obj(*p);
if (!p)
return -ENOMEM;