[WATCHDOG] sc1200wdt.c pnp unregister fix.
[safe/jmp/linux-2.6] / drivers / char / watchdog / pnx4008_wdt.c
index 359168e..3a55fc6 100644 (file)
@@ -14,7 +14,6 @@
  * or implied.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/types.h>
@@ -104,7 +103,8 @@ static void wdt_enable(void)
        /* stop counter, initiate counter reset */
        __raw_writel(RESET_COUNT, WDTIM_CTRL(wdt_base));
        /*wait for reset to complete. 100% guarantee event */
-       while (__raw_readl(WDTIM_COUNTER(wdt_base)));
+       while (__raw_readl(WDTIM_COUNTER(wdt_base)))
+               cpu_relax();
        /* internal and external reset, stop after that */
        __raw_writel(M_RES2 | STOP_COUNT0 | RESET_COUNT0,
                WDTIM_MCTRL(wdt_base));
@@ -183,7 +183,7 @@ static int
 pnx4008_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
                  unsigned long arg)
 {
-       int ret = -ENOIOCTLCMD;
+       int ret = -ENOTTY;
        int time;
 
        switch (cmd) {