summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2010-09-22 23:42:32 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2010-09-22 23:42:32 +0000
commita34a0b1876948d34c8f7d49f224998a6dfc7755a (patch)
tree46259f7a7abfeea04b1b9f8fe382311f43bfae94
parent7df50a8b0ead14610134e57b05a81340febd8db8 (diff)
Fix a compiler warning in src/lib/usbdebug.c (trivial).
The 'delay' variable shadows the global 'delay()' function, yielding this compiler warning/error: src/pc80/../lib/usbdebug.c: In function `ehci_reset_port': src/pc80/../lib/usbdebug.c:281: error: declaration of `delay' shadows a global declaration src/lib/delay.c:9: error: shadowed declaration is here This fixes the issue by renaming the 'delay' variable to 'delay_ms'. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5826 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--src/lib/usbdebug.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c
index 42b4ba87d3..8dec4e37b6 100644
--- a/src/lib/usbdebug.c
+++ b/src/lib/usbdebug.c
@@ -278,7 +278,7 @@ int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned devnum, int requ
static int ehci_reset_port(struct ehci_regs *ehci_regs, int port)
{
unsigned portsc;
- unsigned delay_time, delay;
+ unsigned delay_time, delay_ms;
int loop;
/* Reset the usb debug port */
@@ -287,10 +287,10 @@ static int ehci_reset_port(struct ehci_regs *ehci_regs, int port)
portsc |= PORT_RESET;
write32((unsigned long)&ehci_regs->port_status[port - 1], portsc);
- delay = HUB_ROOT_RESET_TIME;
+ delay_ms = HUB_ROOT_RESET_TIME;
for (delay_time = 0; delay_time < HUB_RESET_TIMEOUT;
- delay_time += delay) {
- dbgp_mdelay(delay);
+ delay_time += delay_ms) {
+ dbgp_mdelay(delay_ms);
portsc = read32((unsigned long)&ehci_regs->port_status[port - 1]);
if (portsc & PORT_RESET) {
@@ -299,9 +299,9 @@ static int ehci_reset_port(struct ehci_regs *ehci_regs, int port)
write32((unsigned long)&ehci_regs->port_status[port - 1],
portsc & ~(PORT_RWC_BITS | PORT_RESET));
do {
- dbgp_mdelay(delay);
+ dbgp_mdelay(delay_ms);
portsc = read32((unsigned long)&ehci_regs->port_status[port - 1]);
- delay_time += delay;
+ delay_time += delay_ms;
} while ((portsc & PORT_RESET) && (--loop > 0));
if (!loop) {
printk(BIOS_DEBUG, "ehci_reset_port forced done");