cleanup the watchdog driver a bit
SVN-Revision: 16395
This commit is contained in:
parent
972619416e
commit
e9c22f7939
1 changed files with 10 additions and 10 deletions
|
@ -74,7 +74,7 @@ static void bcm63xx_timer_tick(unsigned long unused)
|
||||||
bcm63xx_wdt_hw_start();
|
bcm63xx_wdt_hw_start();
|
||||||
mod_timer(&bcm63xx_wdt_device.timer, jiffies + HZ);
|
mod_timer(&bcm63xx_wdt_device.timer, jiffies + HZ);
|
||||||
} else
|
} else
|
||||||
printk(KERN_CRIT PFX "watchdog will restart system\n");
|
printk(KERN_CRIT PFX ": watchdog will restart system\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bcm63xx_wdt_pet(void)
|
static void bcm63xx_wdt_pet(void)
|
||||||
|
@ -190,7 +190,7 @@ static long bcm63xx_wdt_ioctl(struct file *file, unsigned int cmd,
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
case WDIOC_KEEPALIVE:
|
case WDIOC_KEEPALIVE:
|
||||||
bcm63xx_wdt_pet();
|
bcm63xx_wdt_pet();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WDIOC_SETTIMEOUT:
|
case WDIOC_SETTIMEOUT:
|
||||||
|
@ -212,14 +212,14 @@ static long bcm63xx_wdt_ioctl(struct file *file, unsigned int cmd,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bcm63xx_wdt_notify_sys(struct notifier_block *this,
|
static int bcm63xx_wdt_notify_sys(struct notifier_block *this,
|
||||||
unsigned long code, void *unused)
|
unsigned long code, void *unused)
|
||||||
{
|
{
|
||||||
if (code == SYS_DOWN || code == SYS_HALT)
|
if (code == SYS_DOWN || code == SYS_HALT)
|
||||||
bcm63xx_wdt_pause();
|
bcm63xx_wdt_pause();
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations bcm63xx_wdt_fops = {
|
static const struct file_operations bcm63xx_wdt_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = bcm63xx_wdt_write,
|
.write = bcm63xx_wdt_write,
|
||||||
|
@ -271,7 +271,7 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_ERR PFX
|
printk(KERN_ERR PFX
|
||||||
"failed to register reboot_notifier\n");
|
"failed to register reboot_notifier\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = misc_register(&bcm63xx_wdt_miscdev);
|
ret = misc_register(&bcm63xx_wdt_miscdev);
|
||||||
|
|
Loading…
Reference in a new issue