summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/watchdog_core.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2016-01-03 15:11:58 -0800
committerWim Van Sebroeck <wim@iguana.be>2016-01-11 21:53:59 +0100
commit0254e953537c92df3e7d0176f401a211e944fd61 (patch)
treeeee8c9b7645c2add9f49c71d39b0e31950ac7efb /drivers/watchdog/watchdog_core.c
parent2c2f3080de7341f58a5d0e8ea31cc66dd369b8f4 (diff)
downloadlinux-0254e953537c92df3e7d0176f401a211e944fd61.tar.bz2
watchdog: Drop pointer to watchdog device from struct watchdog_device
The lifetime of the watchdog device pointer is different from the lifetime of its character device. Remove it entirely to avoid race conditions. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/watchdog_core.c')
-rw-r--r--drivers/watchdog/watchdog_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
index ec1ab6c1a80b..e600fd93b7de 100644
--- a/drivers/watchdog/watchdog_core.c
+++ b/drivers/watchdog/watchdog_core.c
@@ -249,8 +249,8 @@ static int __watchdog_register_device(struct watchdog_device *wdd)
ret = register_reboot_notifier(&wdd->reboot_nb);
if (ret) {
- dev_err(wdd->dev, "Cannot register reboot notifier (%d)\n",
- ret);
+ pr_err("watchdog%d: Cannot register reboot notifier (%d)\n",
+ wdd->id, ret);
watchdog_dev_unregister(wdd);
ida_simple_remove(&watchdog_ida, wdd->id);
return ret;
@@ -262,8 +262,8 @@ static int __watchdog_register_device(struct watchdog_device *wdd)
ret = register_restart_handler(&wdd->restart_nb);
if (ret)
- dev_warn(wdd->dev, "Cannot register restart handler (%d)\n",
- ret);
+ pr_warn("watchog%d: Cannot register restart handler (%d)\n",
+ wdd->id, ret);
}
return 0;