diff options
author | Andiry Xu <andiry.xu@amd.com> | 2011-01-06 10:43:17 +0300 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-03-14 04:07:09 +0300 |
commit | 019a35f1142b1cd153c8a38338515e633ec0cf77 (patch) | |
tree | a61347c56b71a62d9774d3012f7dd449b174674f /drivers/usb | |
parent | 518e848ea8e2932ce18ce2daef8ad5f55a145f27 (diff) | |
download | linux-019a35f1142b1cd153c8a38338515e633ec0cf77.tar.xz |
xHCI: Remove redundant variable in xhci_resume()
Set hcd->state = HC_STATE_SUSPENDED if there is a power loss during system
resume or the system is hibernated, otherwise leave it be. The variable
old_state is redundant and made an unreachable code path, so remove it.
Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 64f82b999221..023175eab07d 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -696,9 +696,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) { u32 command, temp = 0; struct usb_hcd *hcd = xhci_to_hcd(xhci); - int old_state, retval; + int retval; - old_state = hcd->state; if (time_before(jiffies, xhci->next_statechange)) msleep(100); @@ -782,10 +781,6 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) */ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); - if (!hibernated) - hcd->state = old_state; - else - hcd->state = HC_STATE_SUSPENDED; spin_unlock_irq(&xhci->lock); return 0; |