summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
37f69ce)
#include <linux/watchdog.h>
#include <linux/uaccess.h>
#include <linux/pci.h>
#include <linux/watchdog.h>
#include <linux/uaccess.h>
#include <linux/pci.h>
+#include <linux/delay.h>
#include <asm/rdc321x_defs.h>
#include <asm/rdc321x_defs.h>
static int rdc321x_wdt_release(struct inode *inode, struct file *file)
{
static int rdc321x_wdt_release(struct inode *inode, struct file *file)
{
- if (rdc321x_wdt_dev.close_expected)
- rdc321x_wdt_stop();
+ int res;
+ if (rdc321x_wdt_dev.close_expected) {
+ res = rdc321x_wdt_stop();
+ if (res)
+ return res;
+ }
rdc321x_wdt_dev.inuse = false;
rdc321x_wdt_dev.inuse = false;
size_t count, loff_t *ppos)
{
size_t i;
size_t count, loff_t *ppos)
{
size_t i;
{
if (rdc321x_wdt_dev.inuse)
rdc321x_wdt_dev.inuse = 0;
{
if (rdc321x_wdt_dev.inuse)
rdc321x_wdt_dev.inuse = 0;
+
+ while (timer_pending(&rdc321x_wdt_dev.timer))
+ msleep(100);
+
misc_deregister(&rdc321x_wdt_misc);
return 0;
}
misc_deregister(&rdc321x_wdt_misc);
return 0;
}