Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[pandora-kernel.git] / drivers / char / watchdog / wdt.c
index 5684aa3..70be81e 100644 (file)
@@ -31,7 +31,6 @@
  *             Matt Domsch     :       Added nowayout module option
  */
 
-#include <linux/config.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
@@ -63,12 +62,7 @@ static int wd_heartbeat;
 module_param(heartbeat, int, 0);
 MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536, default=" __MODULE_STRING(WD_TIMO) ")");
 
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
-static int nowayout = 1;
-#else
-static int nowayout = 0;
-#endif
-
+static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
 
@@ -266,7 +260,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                printk(KERN_CRIT "Would Reboot.\n");
 #else
                printk(KERN_CRIT "Initiating system reboot.\n");
-               machine_restart(NULL);
+               emergency_restart();
 #endif
 #else
                printk(KERN_CRIT "Reset in 5ms.\n");
@@ -500,7 +494,7 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code,
  */
 
 
-static struct file_operations wdt_fops = {
+static const struct file_operations wdt_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
        .write          = wdt_write,
@@ -516,7 +510,7 @@ static struct miscdevice wdt_miscdev = {
 };
 
 #ifdef CONFIG_WDT_501
-static struct file_operations wdt_temp_fops = {
+static const struct file_operations wdt_temp_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
        .read           = wdt_temp_read,
@@ -586,7 +580,7 @@ static int __init wdt_init(void)
                goto out;
        }
 
-       ret = request_irq(irq, wdt_interrupt, SA_INTERRUPT, "wdt501p", NULL);
+       ret = request_irq(irq, wdt_interrupt, IRQF_DISABLED, "wdt501p", NULL);
        if(ret) {
                printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq);
                goto outreg;