Pull remove-hotkey into release branch
[sfrench/cifs-2.6.git] / drivers / char / watchdog / shwdt.c
index e5b8c64f1d65acf4ac67dfb8f77d5376d2ac974e..cecbedd473a4392436ea150e1446b66c0a4c4601 100644 (file)
@@ -65,10 +65,12 @@ static int clock_division_ratio = WTCSR_CKS_4096;
 
 #define next_ping_period(cks)  msecs_to_jiffies(cks - 4)
 
+static void sh_wdt_ping(unsigned long data);
+
 static unsigned long shwdt_is_open;
 static struct watchdog_info sh_wdt_info;
 static char shwdt_expect_close;
-static struct timer_list timer;
+static DEFINE_TIMER(timer, sh_wdt_ping, 0, 0);
 static unsigned long next_heartbeat;
 
 #define WATCHDOG_HEARTBEAT 30                  /* 30 sec default heartbeat */
@@ -360,7 +362,7 @@ static int sh_wdt_ioctl(struct inode *inode, struct file *file,
 
                        return retval;
                default:
-                       return -ENOIOCTLCMD;
+                       return -ENOTTY;
        }
 
        return 0;
@@ -433,10 +435,6 @@ static int __init sh_wdt_init(void)
                       "be 1<=x<=3600, using %d\n", heartbeat);
        }
 
-       init_timer(&timer);
-       timer.function = sh_wdt_ping;
-       timer.data = 0;
-
        rc = register_reboot_notifier(&sh_wdt_notifier);
        if (unlikely(rc)) {
                printk(KERN_ERR PFX "Can't register reboot notifier (err=%d)\n",