[WATCHDOG] powerpc: pika_wdt ident cannot be const
[safe/jmp/linux-2.6] / drivers / watchdog / ibmasr.c
index 6824bf8..89fcefc 100644 (file)
@@ -85,7 +85,6 @@ static void __asr_toggle(void)
 
        outb(reg & ~asr_toggle_mask, asr_write_addr);
        reg = inb(asr_read_addr);
-       spin_unlock(&asr_lock);
 }
 
 static void asr_toggle(void)
@@ -275,7 +274,7 @@ static long asr_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        static const struct watchdog_info ident = {
                .options =      WDIOF_KEEPALIVEPING |
                                WDIOF_MAGICCLOSE,
-               .identity =     "IBM ASR"
+               .identity =     "IBM ASR",
        };
        void __user *argp = (void __user *)arg;
        int __user *p = argp;
@@ -287,16 +286,6 @@ static long asr_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        case WDIOC_GETSTATUS:
        case WDIOC_GETBOOTSTATUS:
                return put_user(0, p);
-       case WDIOC_KEEPALIVE:
-               asr_toggle();
-               return 0;
-       /*
-        * The hardware has a fixed timeout value, so no WDIOC_SETTIMEOUT
-        * and WDIOC_GETTIMEOUT always returns 256.
-        */
-       case WDIOC_GETTIMEOUT:
-               heartbeat = 256;
-               return put_user(heartbeat, p);
        case WDIOC_SETOPTIONS:
        {
                int new_options, retval = -EINVAL;
@@ -313,6 +302,16 @@ static long asr_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                }
                return retval;
        }
+       case WDIOC_KEEPALIVE:
+               asr_toggle();
+               return 0;
+       /*
+        * The hardware has a fixed timeout value, so no WDIOC_SETTIMEOUT
+        * and WDIOC_GETTIMEOUT always returns 256.
+        */
+       case WDIOC_GETTIMEOUT:
+               heartbeat = 256;
+               return put_user(heartbeat, p);
        default:
                return -ENOTTY;
        }
@@ -345,7 +344,7 @@ static int asr_release(struct inode *inode, struct file *file)
 
 static const struct file_operations asr_fops = {
        .owner =                THIS_MODULE,
-       .llseek =               no_llseek,
+       .llseek =               no_llseek,
        .write =                asr_write,
        .unlocked_ioctl =       asr_ioctl,
        .open =                 asr_open,