summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-pci.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-10-19 10:55:16 +0300
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2012-11-12 11:45:34 -0800
commit77b847677e7cb633627a9ddaa7efbc3fa8586427 (patch)
treeef429fad8f64d69f81e028fa32ace84705dd5997 /drivers/usb/host/xhci-pci.c
parentb0e4e606ff6ff26da0f60826e75577b56ba4e463 (diff)
usb: host: xhci: move HC_STATE_SUSPENDED check to xhci_suspend()
that check will have to be done by all users of xhci_suspend() so it sounds a lot better to move the check to xhci_suspend() in order to avoid code duplication. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci-pci.c')
-rw-r--r--drivers/usb/host/xhci-pci.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index dcb72f724d0e..af259e0ec172 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -221,15 +221,8 @@ static void xhci_pci_remove(struct pci_dev *dev)
static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
{
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
- int retval = 0;
- if (hcd->state != HC_STATE_SUSPENDED ||
- xhci->shared_hcd->state != HC_STATE_SUSPENDED)
- return -EINVAL;
-
- retval = xhci_suspend(xhci);
-
- return retval;
+ return xhci_suspend(xhci);
}
static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)