]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/watchdog/pcwd.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6-omap-h63xx.git] / drivers / watchdog / pcwd.c
index e1259adf09f97c04cc7acd98db8415e8ecc0f924..9e1331a3b2157e5c7e746ab164209bc0fe77cbe7 100644 (file)
@@ -145,7 +145,7 @@ static int pcwd_ioports[] = { 0x270, 0x350, 0x370, 0x000 };
 #define CMD_ISA_RESET_RELAYS           0x0D
 
 /* Watchdog's Dip Switch heartbeat values */
-static const int heartbeat_tbl [] = {
+static const int heartbeat_tbl[] = {
        20,     /* OFF-OFF-OFF  = 20 Sec  */
        40,     /* OFF-OFF-ON   = 40 Sec  */
        60,     /* OFF-ON-OFF   =  1 Min  */
@@ -168,7 +168,7 @@ static const int heartbeat_tbl [] = {
 static int cards_found;
 
 /* internal variables */
-static atomic_t open_allowed = ATOMIC_INIT(1);
+static unsigned long open_allowed;
 static char expect_close;
 static int temp_panic;
 
@@ -272,7 +272,7 @@ static int set_command_mode(void)
                printk(KERN_DEBUG PFX "command_mode=%d\n",
                                pcwd_private.command_mode);
 
-       return(found);
+       return found;
 }
 
 static void unset_command_mode(void)
@@ -325,7 +325,7 @@ static inline int pcwd_get_option_switches(void)
        }
 
        unset_command_mode();
-       return(option_switches);
+       return option_switches;
 }
 
 static void pcwd_show_card_info(void)
@@ -612,9 +612,6 @@ static long pcwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        };
 
        switch (cmd) {
-       default:
-               return -ENOTTY;
-
        case WDIOC_GETSUPPORT:
                if (copy_to_user(argp, &ident, sizeof(ident)))
                        return -EFAULT;
@@ -669,6 +666,9 @@ static long pcwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
        case WDIOC_GETTIMEOUT:
                return put_user(heartbeat, argp);
+
+       default:
+               return -ENOTTY;
        }
 
        return 0;