提交 de7fe963 编写于 作者: R Roger While 提交者: John W. Linville

[PATCH] prism54 : Unused variable / extraneous udelay

In isl_38xx.c :
The variable "counter" is defined and incremented but never
used except if the driver is hand-compiled setting
VERBOSE > SHOW_ERROR_MESSAGES.
Move the definition and the increment to within the
#if VERBOSE ..   block.

Remove extraneous udelay's.
These are not required when triggering the device.
Signed-off-by: NRoger While <simrw@sim-basis.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 ac1f60db
...@@ -112,9 +112,10 @@ isl38xx_handle_wakeup(isl38xx_control_block *control_block, ...@@ -112,9 +112,10 @@ isl38xx_handle_wakeup(isl38xx_control_block *control_block,
void void
isl38xx_trigger_device(int asleep, void __iomem *device_base) isl38xx_trigger_device(int asleep, void __iomem *device_base)
{ {
u32 reg, counter = 0; u32 reg;
#if VERBOSE > SHOW_ERROR_MESSAGES #if VERBOSE > SHOW_ERROR_MESSAGES
u32 counter = 0;
struct timeval current_time; struct timeval current_time;
DEBUG(SHOW_FUNCTION_CALLS, "isl38xx trigger device\n"); DEBUG(SHOW_FUNCTION_CALLS, "isl38xx trigger device\n");
#endif #endif
...@@ -131,7 +132,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base) ...@@ -131,7 +132,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
current_time.tv_sec, (long)current_time.tv_usec, current_time.tv_sec, (long)current_time.tv_usec,
readl(device_base + ISL38XX_CTRL_STAT_REG)); readl(device_base + ISL38XX_CTRL_STAT_REG));
#endif #endif
udelay(ISL38XX_WRITEIO_DELAY);
reg = readl(device_base + ISL38XX_INT_IDENT_REG); reg = readl(device_base + ISL38XX_INT_IDENT_REG);
if (reg == 0xabadface) { if (reg == 0xabadface) {
...@@ -145,7 +145,9 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base) ...@@ -145,7 +145,9 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
while (reg = readl(device_base + ISL38XX_CTRL_STAT_REG), while (reg = readl(device_base + ISL38XX_CTRL_STAT_REG),
(reg & ISL38XX_CTRL_STAT_SLEEPMODE) == 0) { (reg & ISL38XX_CTRL_STAT_SLEEPMODE) == 0) {
udelay(ISL38XX_WRITEIO_DELAY); udelay(ISL38XX_WRITEIO_DELAY);
#if VERBOSE > SHOW_ERROR_MESSAGES
counter++; counter++;
#endif
} }
#if VERBOSE > SHOW_ERROR_MESSAGES #if VERBOSE > SHOW_ERROR_MESSAGES
...@@ -153,10 +155,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base) ...@@ -153,10 +155,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
"%08li.%08li Device register read %08x\n", "%08li.%08li Device register read %08x\n",
current_time.tv_sec, (long)current_time.tv_usec, current_time.tv_sec, (long)current_time.tv_usec,
readl(device_base + ISL38XX_CTRL_STAT_REG)); readl(device_base + ISL38XX_CTRL_STAT_REG));
#endif
udelay(ISL38XX_WRITEIO_DELAY);
#if VERBOSE > SHOW_ERROR_MESSAGES
do_gettimeofday(&current_time); do_gettimeofday(&current_time);
DEBUG(SHOW_TRACING, DEBUG(SHOW_TRACING,
"%08li.%08li Device asleep counter %i\n", "%08li.%08li Device asleep counter %i\n",
...@@ -171,7 +169,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base) ...@@ -171,7 +169,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
/* perform another read on the Device Status Register */ /* perform another read on the Device Status Register */
reg = readl(device_base + ISL38XX_CTRL_STAT_REG); reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
udelay(ISL38XX_WRITEIO_DELAY);
#if VERBOSE > SHOW_ERROR_MESSAGES #if VERBOSE > SHOW_ERROR_MESSAGES
do_gettimeofday(&current_time); do_gettimeofday(&current_time);
...@@ -187,7 +184,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base) ...@@ -187,7 +184,6 @@ isl38xx_trigger_device(int asleep, void __iomem *device_base)
isl38xx_w32_flush(device_base, ISL38XX_DEV_INT_UPDATE, isl38xx_w32_flush(device_base, ISL38XX_DEV_INT_UPDATE,
ISL38XX_DEV_INT_REG); ISL38XX_DEV_INT_REG);
udelay(ISL38XX_WRITEIO_DELAY);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册