Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 1 | /* |
| 2 | * watchdog_core.c |
| 3 | * |
| 4 | * (c) Copyright 2008-2011 Alan Cox <alan@lxorguk.ukuu.org.uk>, |
| 5 | * All Rights Reserved. |
| 6 | * |
| 7 | * (c) Copyright 2008-2011 Wim Van Sebroeck <wim@iguana.be>. |
| 8 | * |
| 9 | * This source code is part of the generic code that can be used |
| 10 | * by all the watchdog timer drivers. |
| 11 | * |
| 12 | * Based on source code of the following authors: |
| 13 | * Matt Domsch <Matt_Domsch@dell.com>, |
| 14 | * Rob Radez <rob@osinvestor.com>, |
| 15 | * Rusty Lynch <rusty@linux.co.intel.com> |
| 16 | * Satyam Sharma <satyam@infradead.org> |
| 17 | * Randy Dunlap <randy.dunlap@oracle.com> |
| 18 | * |
| 19 | * This program is free software; you can redistribute it and/or |
| 20 | * modify it under the terms of the GNU General Public License |
| 21 | * as published by the Free Software Foundation; either version |
| 22 | * 2 of the License, or (at your option) any later version. |
| 23 | * |
| 24 | * Neither Alan Cox, CymruNet Ltd., Wim Van Sebroeck nor Iguana vzw. |
| 25 | * admit liability nor provide warranty for any of this software. |
| 26 | * This material is provided "AS-IS" and at no charge. |
| 27 | */ |
| 28 | |
| 29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 30 | |
| 31 | #include <linux/module.h> /* For EXPORT_SYMBOL/module stuff/... */ |
| 32 | #include <linux/types.h> /* For standard types */ |
| 33 | #include <linux/errno.h> /* For the -ENODEV/... values */ |
| 34 | #include <linux/kernel.h> /* For printk/panic/... */ |
Damien Riegel | 2165bf5 | 2015-11-16 12:27:59 -0500 | [diff] [blame] | 35 | #include <linux/reboot.h> /* For restart handler */ |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 36 | #include <linux/watchdog.h> /* For watchdog specific items */ |
| 37 | #include <linux/init.h> /* For __init/__exit/... */ |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 38 | #include <linux/idr.h> /* For ida_* macros */ |
Alan Cox | d6b469d | 2012-05-11 12:00:20 +0200 | [diff] [blame] | 39 | #include <linux/err.h> /* For IS_ERR macros */ |
Fabio Porcedda | 3048253 | 2013-01-08 11:04:10 +0100 | [diff] [blame] | 40 | #include <linux/of.h> /* For of_get_timeout_sec */ |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 41 | |
Wim Van Sebroeck | 6cfb5aa | 2012-05-21 15:31:06 +0200 | [diff] [blame] | 42 | #include "watchdog_core.h" /* For watchdog_dev_register/... */ |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 43 | |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 44 | static DEFINE_IDA(watchdog_ida); |
Alan Cox | d6b469d | 2012-05-11 12:00:20 +0200 | [diff] [blame] | 45 | static struct class *watchdog_class; |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 46 | |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 47 | /* |
| 48 | * Deferred Registration infrastructure. |
| 49 | * |
| 50 | * Sometimes watchdog drivers needs to be loaded as soon as possible, |
| 51 | * for example when it's impossible to disable it. To do so, |
| 52 | * raising the initcall level of the watchdog driver is a solution. |
| 53 | * But in such case, the miscdev is maybe not ready (subsys_initcall), and |
| 54 | * watchdog_core need miscdev to register the watchdog as a char device. |
| 55 | * |
| 56 | * The deferred registration infrastructure offer a way for the watchdog |
| 57 | * subsystem to register a watchdog properly, even before miscdev is ready. |
| 58 | */ |
| 59 | |
| 60 | static DEFINE_MUTEX(wtd_deferred_reg_mutex); |
| 61 | static LIST_HEAD(wtd_deferred_reg_list); |
| 62 | static bool wtd_deferred_reg_done; |
| 63 | |
| 64 | static int watchdog_deferred_registration_add(struct watchdog_device *wdd) |
| 65 | { |
| 66 | list_add_tail(&wdd->deferred, |
| 67 | &wtd_deferred_reg_list); |
| 68 | return 0; |
| 69 | } |
| 70 | |
| 71 | static void watchdog_deferred_registration_del(struct watchdog_device *wdd) |
| 72 | { |
| 73 | struct list_head *p, *n; |
| 74 | struct watchdog_device *wdd_tmp; |
| 75 | |
| 76 | list_for_each_safe(p, n, &wtd_deferred_reg_list) { |
| 77 | wdd_tmp = list_entry(p, struct watchdog_device, |
| 78 | deferred); |
| 79 | if (wdd_tmp == wdd) { |
| 80 | list_del(&wdd_tmp->deferred); |
| 81 | break; |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | |
Fabio Porcedda | 3048253 | 2013-01-08 11:04:10 +0100 | [diff] [blame] | 86 | static void watchdog_check_min_max_timeout(struct watchdog_device *wdd) |
| 87 | { |
| 88 | /* |
| 89 | * Check that we have valid min and max timeout values, if |
| 90 | * not reset them both to 0 (=not used or unknown) |
| 91 | */ |
| 92 | if (wdd->min_timeout > wdd->max_timeout) { |
| 93 | pr_info("Invalid min and max timeout values, resetting to 0!\n"); |
| 94 | wdd->min_timeout = 0; |
| 95 | wdd->max_timeout = 0; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * watchdog_init_timeout() - initialize the timeout field |
| 101 | * @timeout_parm: timeout module parameter |
| 102 | * @dev: Device that stores the timeout-sec property |
| 103 | * |
| 104 | * Initialize the timeout field of the watchdog_device struct with either the |
| 105 | * timeout module parameter (if it is valid value) or the timeout-sec property |
| 106 | * (only if it is a valid value and the timeout_parm is out of bounds). |
| 107 | * If none of them are valid then we keep the old value (which should normally |
| 108 | * be the default timeout value. |
| 109 | * |
| 110 | * A zero is returned on success and -EINVAL for failure. |
| 111 | */ |
| 112 | int watchdog_init_timeout(struct watchdog_device *wdd, |
| 113 | unsigned int timeout_parm, struct device *dev) |
| 114 | { |
| 115 | unsigned int t = 0; |
| 116 | int ret = 0; |
| 117 | |
| 118 | watchdog_check_min_max_timeout(wdd); |
| 119 | |
Sachin Kamat | 6ffcff9 | 2013-10-28 14:17:17 +0530 | [diff] [blame] | 120 | /* try to get the timeout module parameter first */ |
Doug Anderson | 2c34d59 | 2013-11-26 10:22:52 -0800 | [diff] [blame] | 121 | if (!watchdog_timeout_invalid(wdd, timeout_parm) && timeout_parm) { |
Fabio Porcedda | 3048253 | 2013-01-08 11:04:10 +0100 | [diff] [blame] | 122 | wdd->timeout = timeout_parm; |
| 123 | return ret; |
| 124 | } |
| 125 | if (timeout_parm) |
| 126 | ret = -EINVAL; |
| 127 | |
| 128 | /* try to get the timeout_sec property */ |
| 129 | if (dev == NULL || dev->of_node == NULL) |
| 130 | return ret; |
| 131 | of_property_read_u32(dev->of_node, "timeout-sec", &t); |
Doug Anderson | 2c34d59 | 2013-11-26 10:22:52 -0800 | [diff] [blame] | 132 | if (!watchdog_timeout_invalid(wdd, t) && t) |
Fabio Porcedda | 3048253 | 2013-01-08 11:04:10 +0100 | [diff] [blame] | 133 | wdd->timeout = t; |
| 134 | else |
| 135 | ret = -EINVAL; |
| 136 | |
| 137 | return ret; |
| 138 | } |
| 139 | EXPORT_SYMBOL_GPL(watchdog_init_timeout); |
| 140 | |
Damien Riegel | e131319 | 2015-11-20 16:54:51 -0500 | [diff] [blame^] | 141 | static int watchdog_reboot_notifier(struct notifier_block *nb, |
| 142 | unsigned long code, void *data) |
| 143 | { |
| 144 | struct watchdog_device *wdd = container_of(nb, struct watchdog_device, |
| 145 | reboot_nb); |
| 146 | |
| 147 | if (code == SYS_DOWN || code == SYS_HALT) { |
| 148 | if (watchdog_active(wdd)) { |
| 149 | int ret; |
| 150 | |
| 151 | ret = wdd->ops->stop(wdd); |
| 152 | if (ret) |
| 153 | return NOTIFY_BAD; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | return NOTIFY_DONE; |
| 158 | } |
| 159 | |
Damien Riegel | 2165bf5 | 2015-11-16 12:27:59 -0500 | [diff] [blame] | 160 | static int watchdog_restart_notifier(struct notifier_block *nb, |
| 161 | unsigned long action, void *data) |
| 162 | { |
| 163 | struct watchdog_device *wdd = container_of(nb, struct watchdog_device, |
| 164 | restart_nb); |
| 165 | |
| 166 | int ret; |
| 167 | |
| 168 | ret = wdd->ops->restart(wdd); |
| 169 | if (ret) |
| 170 | return NOTIFY_BAD; |
| 171 | |
| 172 | return NOTIFY_DONE; |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * watchdog_set_restart_priority - Change priority of restart handler |
| 177 | * @wdd: watchdog device |
| 178 | * @priority: priority of the restart handler, should follow these guidelines: |
| 179 | * 0: use watchdog's restart function as last resort, has limited restart |
| 180 | * capabilies |
| 181 | * 128: default restart handler, use if no other handler is expected to be |
| 182 | * available and/or if restart is sufficient to restart the entire system |
| 183 | * 255: preempt all other handlers |
| 184 | * |
| 185 | * If a wdd->ops->restart function is provided when watchdog_register_device is |
| 186 | * called, it will be registered as a restart handler with the priority given |
| 187 | * here. |
| 188 | */ |
| 189 | void watchdog_set_restart_priority(struct watchdog_device *wdd, int priority) |
| 190 | { |
| 191 | wdd->restart_nb.priority = priority; |
| 192 | } |
| 193 | EXPORT_SYMBOL_GPL(watchdog_set_restart_priority); |
| 194 | |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 195 | static int __watchdog_register_device(struct watchdog_device *wdd) |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 196 | { |
Justin Chen | 9dd4e17 | 2015-09-02 11:00:17 -0700 | [diff] [blame] | 197 | int ret, id = -1, devno; |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 198 | |
| 199 | if (wdd == NULL || wdd->info == NULL || wdd->ops == NULL) |
| 200 | return -EINVAL; |
| 201 | |
| 202 | /* Mandatory operations need to be supported */ |
| 203 | if (wdd->ops->start == NULL || wdd->ops->stop == NULL) |
| 204 | return -EINVAL; |
| 205 | |
Fabio Porcedda | 3048253 | 2013-01-08 11:04:10 +0100 | [diff] [blame] | 206 | watchdog_check_min_max_timeout(wdd); |
Wim Van Sebroeck | 3f43f68 | 2011-07-22 19:00:16 +0000 | [diff] [blame] | 207 | |
| 208 | /* |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 209 | * Note: now that all watchdog_device data has been verified, we |
| 210 | * will not check this anymore in other functions. If data gets |
| 211 | * corrupted in a later stage then we expect a kernel panic! |
| 212 | */ |
| 213 | |
Hans de Goede | f4e9c82 | 2012-05-22 11:40:26 +0200 | [diff] [blame] | 214 | mutex_init(&wdd->lock); |
Justin Chen | 9dd4e17 | 2015-09-02 11:00:17 -0700 | [diff] [blame] | 215 | |
| 216 | /* Use alias for watchdog id if possible */ |
| 217 | if (wdd->parent) { |
| 218 | ret = of_alias_get_id(wdd->parent->of_node, "watchdog"); |
| 219 | if (ret >= 0) |
| 220 | id = ida_simple_get(&watchdog_ida, ret, |
| 221 | ret + 1, GFP_KERNEL); |
| 222 | } |
| 223 | |
| 224 | if (id < 0) |
| 225 | id = ida_simple_get(&watchdog_ida, 0, MAX_DOGS, GFP_KERNEL); |
| 226 | |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 227 | if (id < 0) |
| 228 | return id; |
| 229 | wdd->id = id; |
| 230 | |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 231 | ret = watchdog_dev_register(wdd); |
| 232 | if (ret) { |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 233 | ida_simple_remove(&watchdog_ida, id); |
| 234 | if (!(id == 0 && ret == -EBUSY)) |
| 235 | return ret; |
| 236 | |
| 237 | /* Retry in case a legacy watchdog module exists */ |
| 238 | id = ida_simple_get(&watchdog_ida, 1, MAX_DOGS, GFP_KERNEL); |
| 239 | if (id < 0) |
| 240 | return id; |
| 241 | wdd->id = id; |
| 242 | |
| 243 | ret = watchdog_dev_register(wdd); |
| 244 | if (ret) { |
| 245 | ida_simple_remove(&watchdog_ida, id); |
| 246 | return ret; |
| 247 | } |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 248 | } |
| 249 | |
Alan Cox | d6b469d | 2012-05-11 12:00:20 +0200 | [diff] [blame] | 250 | devno = wdd->cdev.dev; |
| 251 | wdd->dev = device_create(watchdog_class, wdd->parent, devno, |
| 252 | NULL, "watchdog%d", wdd->id); |
| 253 | if (IS_ERR(wdd->dev)) { |
| 254 | watchdog_dev_unregister(wdd); |
| 255 | ida_simple_remove(&watchdog_ida, id); |
| 256 | ret = PTR_ERR(wdd->dev); |
| 257 | return ret; |
| 258 | } |
| 259 | |
Damien Riegel | e131319 | 2015-11-20 16:54:51 -0500 | [diff] [blame^] | 260 | if (test_bit(WDOG_STOP_ON_REBOOT, &wdd->status)) { |
| 261 | wdd->reboot_nb.notifier_call = watchdog_reboot_notifier; |
| 262 | |
| 263 | ret = register_reboot_notifier(&wdd->reboot_nb); |
| 264 | if (ret) { |
| 265 | dev_err(wdd->dev, "Cannot register reboot notifier (%d)\n", |
| 266 | ret); |
| 267 | watchdog_dev_unregister(wdd); |
| 268 | device_destroy(watchdog_class, devno); |
| 269 | ida_simple_remove(&watchdog_ida, wdd->id); |
| 270 | wdd->dev = NULL; |
| 271 | return ret; |
| 272 | } |
| 273 | } |
| 274 | |
Damien Riegel | 2165bf5 | 2015-11-16 12:27:59 -0500 | [diff] [blame] | 275 | if (wdd->ops->restart) { |
| 276 | wdd->restart_nb.notifier_call = watchdog_restart_notifier; |
| 277 | |
| 278 | ret = register_restart_handler(&wdd->restart_nb); |
| 279 | if (ret) |
| 280 | dev_warn(wdd->dev, "Cannot register restart handler (%d)\n", |
| 281 | ret); |
| 282 | } |
| 283 | |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 284 | return 0; |
| 285 | } |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 286 | |
| 287 | /** |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 288 | * watchdog_register_device() - register a watchdog device |
| 289 | * @wdd: watchdog device |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 290 | * |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 291 | * Register a watchdog device with the kernel so that the |
| 292 | * watchdog timer can be accessed from userspace. |
| 293 | * |
| 294 | * A zero is returned on success and a negative errno code for |
| 295 | * failure. |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 296 | */ |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 297 | |
| 298 | int watchdog_register_device(struct watchdog_device *wdd) |
| 299 | { |
| 300 | int ret; |
| 301 | |
| 302 | mutex_lock(&wtd_deferred_reg_mutex); |
| 303 | if (wtd_deferred_reg_done) |
| 304 | ret = __watchdog_register_device(wdd); |
| 305 | else |
| 306 | ret = watchdog_deferred_registration_add(wdd); |
| 307 | mutex_unlock(&wtd_deferred_reg_mutex); |
| 308 | return ret; |
| 309 | } |
| 310 | EXPORT_SYMBOL_GPL(watchdog_register_device); |
| 311 | |
| 312 | static void __watchdog_unregister_device(struct watchdog_device *wdd) |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 313 | { |
| 314 | int ret; |
Wei Yongjun | b232a70 | 2012-09-10 12:41:15 +0800 | [diff] [blame] | 315 | int devno; |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 316 | |
| 317 | if (wdd == NULL) |
| 318 | return; |
| 319 | |
Damien Riegel | 2165bf5 | 2015-11-16 12:27:59 -0500 | [diff] [blame] | 320 | if (wdd->ops->restart) |
| 321 | unregister_restart_handler(&wdd->restart_nb); |
| 322 | |
Damien Riegel | e131319 | 2015-11-20 16:54:51 -0500 | [diff] [blame^] | 323 | if (test_bit(WDOG_STOP_ON_REBOOT, &wdd->status)) |
| 324 | unregister_reboot_notifier(&wdd->reboot_nb); |
| 325 | |
Wei Yongjun | b232a70 | 2012-09-10 12:41:15 +0800 | [diff] [blame] | 326 | devno = wdd->cdev.dev; |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 327 | ret = watchdog_dev_unregister(wdd); |
| 328 | if (ret) |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 329 | pr_err("error unregistering /dev/watchdog (err=%d)\n", ret); |
Alan Cox | d6b469d | 2012-05-11 12:00:20 +0200 | [diff] [blame] | 330 | device_destroy(watchdog_class, devno); |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 331 | ida_simple_remove(&watchdog_ida, wdd->id); |
Alan Cox | d6b469d | 2012-05-11 12:00:20 +0200 | [diff] [blame] | 332 | wdd->dev = NULL; |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 333 | } |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 334 | |
| 335 | /** |
| 336 | * watchdog_unregister_device() - unregister a watchdog device |
| 337 | * @wdd: watchdog device to unregister |
| 338 | * |
| 339 | * Unregister a watchdog device that was previously successfully |
| 340 | * registered with watchdog_register_device(). |
| 341 | */ |
| 342 | |
| 343 | void watchdog_unregister_device(struct watchdog_device *wdd) |
| 344 | { |
| 345 | mutex_lock(&wtd_deferred_reg_mutex); |
| 346 | if (wtd_deferred_reg_done) |
| 347 | __watchdog_unregister_device(wdd); |
| 348 | else |
| 349 | watchdog_deferred_registration_del(wdd); |
| 350 | mutex_unlock(&wtd_deferred_reg_mutex); |
| 351 | } |
| 352 | |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 353 | EXPORT_SYMBOL_GPL(watchdog_unregister_device); |
| 354 | |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 355 | static int __init watchdog_deferred_registration(void) |
| 356 | { |
| 357 | mutex_lock(&wtd_deferred_reg_mutex); |
| 358 | wtd_deferred_reg_done = true; |
| 359 | while (!list_empty(&wtd_deferred_reg_list)) { |
| 360 | struct watchdog_device *wdd; |
| 361 | |
| 362 | wdd = list_first_entry(&wtd_deferred_reg_list, |
| 363 | struct watchdog_device, deferred); |
| 364 | list_del(&wdd->deferred); |
| 365 | __watchdog_register_device(wdd); |
| 366 | } |
| 367 | mutex_unlock(&wtd_deferred_reg_mutex); |
| 368 | return 0; |
| 369 | } |
| 370 | |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 371 | static int __init watchdog_init(void) |
| 372 | { |
Alan Cox | d6b469d | 2012-05-11 12:00:20 +0200 | [diff] [blame] | 373 | int err; |
| 374 | |
| 375 | watchdog_class = class_create(THIS_MODULE, "watchdog"); |
| 376 | if (IS_ERR(watchdog_class)) { |
| 377 | pr_err("couldn't create class\n"); |
| 378 | return PTR_ERR(watchdog_class); |
| 379 | } |
| 380 | |
| 381 | err = watchdog_dev_init(); |
| 382 | if (err < 0) { |
| 383 | class_destroy(watchdog_class); |
| 384 | return err; |
| 385 | } |
| 386 | |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 387 | watchdog_deferred_registration(); |
Alan Cox | d6b469d | 2012-05-11 12:00:20 +0200 | [diff] [blame] | 388 | return 0; |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 389 | } |
| 390 | |
| 391 | static void __exit watchdog_exit(void) |
| 392 | { |
| 393 | watchdog_dev_exit(); |
Alan Cox | d6b469d | 2012-05-11 12:00:20 +0200 | [diff] [blame] | 394 | class_destroy(watchdog_class); |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 395 | ida_destroy(&watchdog_ida); |
| 396 | } |
| 397 | |
Jean-Baptiste Theou | ef90174 | 2015-06-09 09:55:02 -0700 | [diff] [blame] | 398 | subsys_initcall_sync(watchdog_init); |
Alan Cox | 45f5fed | 2012-05-10 21:48:59 +0200 | [diff] [blame] | 399 | module_exit(watchdog_exit); |
| 400 | |
Wim Van Sebroeck | 4331604 | 2011-07-22 18:55:18 +0000 | [diff] [blame] | 401 | MODULE_AUTHOR("Alan Cox <alan@lxorguk.ukuu.org.uk>"); |
| 402 | MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>"); |
| 403 | MODULE_DESCRIPTION("WatchDog Timer Driver Core"); |
| 404 | MODULE_LICENSE("GPL"); |