Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / net / wireless / prism54 / isl_38xx.c
index 4481ec1..23deee6 100644 (file)
@@ -18,7 +18,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/delay.h>
@@ -112,10 +111,11 @@ isl38xx_handle_wakeup(isl38xx_control_block *control_block,
 void
 isl38xx_trigger_device(int asleep, void __iomem *device_base)
 {
-       struct timeval current_time;
-       u32 reg, counter = 0;
+       u32 reg;
 
 #if VERBOSE > SHOW_ERROR_MESSAGES
+       u32 counter = 0;
+       struct timeval current_time;
        DEBUG(SHOW_FUNCTION_CALLS, "isl38xx trigger device\n");
 #endif
 
@@ -126,12 +126,11 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
                do_gettimeofday(&current_time);
                DEBUG(SHOW_TRACING, "%08li.%08li Device wakeup triggered\n",
                      current_time.tv_sec, (long)current_time.tv_usec);
-#endif
 
                DEBUG(SHOW_TRACING, "%08li.%08li Device register read %08x\n",
                      current_time.tv_sec, (long)current_time.tv_usec,
                      readl(device_base + ISL38XX_CTRL_STAT_REG));
-               udelay(ISL38XX_WRITEIO_DELAY);
+#endif
 
                reg = readl(device_base + ISL38XX_INT_IDENT_REG);
                if (reg == 0xabadface) {
@@ -145,16 +144,16 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
                        while (reg = readl(device_base + ISL38XX_CTRL_STAT_REG),
                               (reg & ISL38XX_CTRL_STAT_SLEEPMODE) == 0) {
                                udelay(ISL38XX_WRITEIO_DELAY);
+#if VERBOSE > SHOW_ERROR_MESSAGES
                                counter++;
+#endif
                        }
 
+#if VERBOSE > SHOW_ERROR_MESSAGES
                        DEBUG(SHOW_TRACING,
                              "%08li.%08li Device register read %08x\n",
                              current_time.tv_sec, (long)current_time.tv_usec,
                              readl(device_base + ISL38XX_CTRL_STAT_REG));
-                       udelay(ISL38XX_WRITEIO_DELAY);
-
-#if VERBOSE > SHOW_ERROR_MESSAGES
                        do_gettimeofday(&current_time);
                        DEBUG(SHOW_TRACING,
                              "%08li.%08li Device asleep counter %i\n",
@@ -165,13 +164,12 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
                /* assert the Wakeup interrupt in the Device Interrupt Register */
                isl38xx_w32_flush(device_base, ISL38XX_DEV_INT_WAKEUP,
                                  ISL38XX_DEV_INT_REG);
+
+#if VERBOSE > SHOW_ERROR_MESSAGES
                udelay(ISL38XX_WRITEIO_DELAY);
 
                /* perform another read on the Device Status Register */
                reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
-               udelay(ISL38XX_WRITEIO_DELAY);
-
-#if VERBOSE > SHOW_ERROR_MESSAGES
                do_gettimeofday(&current_time);
                DEBUG(SHOW_TRACING, "%08li.%08li Device register read %08x\n",
                      current_time.tv_sec, (long)current_time.tv_usec, reg);
@@ -185,7 +183,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
 
                isl38xx_w32_flush(device_base, ISL38XX_DEV_INT_UPDATE,
                                  ISL38XX_DEV_INT_REG);
-               udelay(ISL38XX_WRITEIO_DELAY);
        }
 }