Skip to content

Commit

Permalink
Fix u132-hcd.c compile error
Browse files Browse the repository at this point in the history
This fixes the following compile error caused by commit
3a2d5b7 ("PM: Introduce
PM_EVENT_HIBERNATE callback state")

    CC [M]  drivers/usb/host/u132-hcd.o
  drivers/usb/host/u132-hcd.c: In function ‘u132_suspend’:
  drivers/usb/host/u132-hcd.c:3224: error: expected expression before ‘int’
  drivers/usb/host/u132-hcd.c:3225: error: ‘ports’ undeclared (first use in this function)
  ...

Signed-off-by: Mirco Tischler <mt-ml@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mirco Tischler authored and Linus Torvalds committed Feb 24, 2008
1 parent 42e6de0 commit 038eb0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/host/u132-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3213,15 +3213,15 @@ static int u132_suspend(struct platform_device *pdev, pm_message_t state)
dev_err(&u132->platform_dev->dev, "device is being removed\n");
return -ESHUTDOWN;
} else {
int retval = 0;
int retval = 0, ports;

switch (state.event) {
case PM_EVENT_FREEZE:
retval = u132_bus_suspend(hcd);
break;
case PM_EVENT_SUSPEND:
case PM_EVENT_HIBERNATE:
int ports = MAX_U132_PORTS;
ports = MAX_U132_PORTS;
while (ports-- > 0) {
port_power(u132, ports, 0);
}
Expand Down

0 comments on commit 038eb0e

Please sign in to comment.