diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c
index 67d9081..7f500ee 100644
--- a/drivers/watchdog/pcwd_pci.c
+++ b/drivers/watchdog/pcwd_pci.c
@@ -470,90 +470,90 @@
 	};
 
 	switch (cmd) {
-		case WDIOC_GETSUPPORT:
-			return copy_to_user(argp, &ident,
-				sizeof (ident)) ? -EFAULT : 0;
+	case WDIOC_GETSUPPORT:
+		return copy_to_user(argp, &ident,
+			sizeof (ident)) ? -EFAULT : 0;
 
-		case WDIOC_GETSTATUS:
-		{
-			int status;
-			pcipcwd_get_status(&status);
-			return put_user(status, p);
+	case WDIOC_GETSTATUS:
+	{
+		int status;
+		pcipcwd_get_status(&status);
+		return put_user(status, p);
+	}
+
+	case WDIOC_GETBOOTSTATUS:
+		return put_user(pcipcwd_private.boot_status, p);
+
+	case WDIOC_GETTEMP:
+	{
+		int temperature;
+
+		if (pcipcwd_get_temperature(&temperature))
+			return -EFAULT;
+
+		return put_user(temperature, p);
+	}
+
+	case WDIOC_KEEPALIVE:
+		pcipcwd_keepalive();
+		return 0;
+
+	case WDIOC_SETOPTIONS:
+	{
+		int new_options, retval = -EINVAL;
+
+		if (get_user (new_options, p))
+			return -EFAULT;
+
+		if (new_options & WDIOS_DISABLECARD) {
+			if (pcipcwd_stop())
+				return -EIO;
+			retval = 0;
 		}
 
-		case WDIOC_GETBOOTSTATUS:
-			return put_user(pcipcwd_private.boot_status, p);
-
-		case WDIOC_GETTEMP:
-		{
-			int temperature;
-
-			if (pcipcwd_get_temperature(&temperature))
-				return -EFAULT;
-
-			return put_user(temperature, p);
+		if (new_options & WDIOS_ENABLECARD) {
+			if (pcipcwd_start())
+				return -EIO;
+			retval = 0;
 		}
 
-		case WDIOC_KEEPALIVE:
-			pcipcwd_keepalive();
-			return 0;
-
-		case WDIOC_SETOPTIONS:
-		{
-			int new_options, retval = -EINVAL;
-
-			if (get_user (new_options, p))
-				return -EFAULT;
-
-			if (new_options & WDIOS_DISABLECARD) {
-				if (pcipcwd_stop())
-					return -EIO;
-				retval = 0;
-			}
-
-			if (new_options & WDIOS_ENABLECARD) {
-				if (pcipcwd_start())
-					return -EIO;
-				retval = 0;
-			}
-
-			if (new_options & WDIOS_TEMPPANIC) {
-				temp_panic = 1;
-				retval = 0;
-			}
-
-			return retval;
+		if (new_options & WDIOS_TEMPPANIC) {
+			temp_panic = 1;
+			retval = 0;
 		}
 
-		case WDIOC_SETTIMEOUT:
-		{
-			int new_heartbeat;
+		return retval;
+	}
 
-			if (get_user(new_heartbeat, p))
-				return -EFAULT;
+	case WDIOC_SETTIMEOUT:
+	{
+		int new_heartbeat;
 
-			if (pcipcwd_set_heartbeat(new_heartbeat))
-			    return -EINVAL;
+		if (get_user(new_heartbeat, p))
+			return -EFAULT;
 
-			pcipcwd_keepalive();
-			/* Fall */
-		}
+		if (pcipcwd_set_heartbeat(new_heartbeat))
+		    return -EINVAL;
 
-		case WDIOC_GETTIMEOUT:
-			return put_user(heartbeat, p);
+		pcipcwd_keepalive();
+		/* Fall */
+	}
 
-		case WDIOC_GETTIMELEFT:
-		{
-			int time_left;
+	case WDIOC_GETTIMEOUT:
+		return put_user(heartbeat, p);
 
-			if (pcipcwd_get_timeleft(&time_left))
-				return -EFAULT;
+	case WDIOC_GETTIMELEFT:
+	{
+		int time_left;
 
-			return put_user(time_left, p);
-		}
+		if (pcipcwd_get_timeleft(&time_left))
+			return -EFAULT;
 
-		default:
-			return -ENOTTY;
+		return put_user(time_left, p);
+	}
+
+	default:
+		return -ENOTTY;
 	}
 }
 
