mv643xx_eth: fix unicast address filter corruption on mtu change
[safe/jmp/linux-2.6] / drivers / watchdog / sc1200wdt.c
index 7e5c9cc..23da3cc 100644 (file)
@@ -148,13 +148,11 @@ static void sc1200wdt_start(void)
        spin_unlock(&sc1200wdt_lock);
 }
 
-
 static void sc1200wdt_stop(void)
 {
        sc1200wdt_write_data(WDTO, 0);
 }
 
-
 /* This returns the status of the WDO signal, inactive high. */
 static inline int sc1200wdt_status(void)
 {
@@ -166,10 +164,8 @@ static inline int sc1200wdt_status(void)
         * else for enabled/disabled status
         */
        return (ret & 0x01) ? 0 : WDIOF_KEEPALIVEPING;
-       /* bits 1 - 7 are undefined */
 }
 
-
 static int sc1200wdt_open(struct inode *inode, struct file *file)
 {
        /* allow one at a time */
@@ -200,7 +196,6 @@ static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,
        };
 
        switch (cmd) {
-
        case WDIOC_GETSUPPORT:
                if (copy_to_user(argp, &ident, sizeof ident))
                        return -EFAULT;
@@ -212,24 +207,6 @@ static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,
        case WDIOC_GETBOOTSTATUS:
                return put_user(0, p);
 
-       case WDIOC_KEEPALIVE:
-               sc1200wdt_write_data(WDTO, timeout);
-               return 0;
-
-       case WDIOC_SETTIMEOUT:
-               if (get_user(new_timeout, p))
-                       return -EFAULT;
-               /* the API states this is given in secs */
-               new_timeout /= 60;
-               if (new_timeout < 0 || new_timeout > MAX_TIMEOUT)
-                       return -EINVAL;
-               timeout = new_timeout;
-               sc1200wdt_write_data(WDTO, timeout);
-               /* fall through and return the new timeout */
-
-       case WDIOC_GETTIMEOUT:
-               return put_user(timeout * 60, p);
-
        case WDIOC_SETOPTIONS:
        {
                int options, retval = -EINVAL;
@@ -249,6 +226,24 @@ static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,
 
                return retval;
        }
+       case WDIOC_KEEPALIVE:
+               sc1200wdt_write_data(WDTO, timeout);
+               return 0;
+
+       case WDIOC_SETTIMEOUT:
+               if (get_user(new_timeout, p))
+                       return -EFAULT;
+               /* the API states this is given in secs */
+               new_timeout /= 60;
+               if (new_timeout < 0 || new_timeout > MAX_TIMEOUT)
+                       return -EINVAL;
+               timeout = new_timeout;
+               sc1200wdt_write_data(WDTO, timeout);
+               /* fall through and return the new timeout */
+
+       case WDIOC_GETTIMEOUT:
+               return put_user(timeout * 60, p);
+
        default:
                return -ENOTTY;
        }
@@ -284,7 +279,7 @@ static ssize_t sc1200wdt_write(struct file *file, const char __user *data,
                        for (i = 0; i != len; i++) {
                                char c;
 
-                               if (get_user(c, data+i))
+                               if (get_user(c, data + i))
                                        return -EFAULT;
                                if (c == 'V')
                                        expect_close = 42;