Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15481
b: refs/heads/master
c: a5e36d2
h: refs/heads/master
i:
  15479: 9054595
v: v3
  • Loading branch information
Richard Purdie authored and Greg Kroah-Hartman committed Jan 4, 2006
1 parent 7adea3f commit 0b32db6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c4c9432a6c916729c7296c47fe93b053a73e20c
refs/heads/master: a5e36d20897ff8317e722fceb4d9eea3e4a5906b
11 changes: 7 additions & 4 deletions trunk/drivers/usb/host/ohci-pxa27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,28 +309,31 @@ static int ohci_hcd_pxa27x_drv_remove(struct platform_device *pdev)
struct usb_hcd *hcd = platform_get_drvdata(pdev);

usb_hcd_pxa27x_remove(hcd, pdev);
platform_set_drvdata(pdev, NULL);
return 0;
}

#ifdef CONFIG_PM
static int ohci_hcd_pxa27x_drv_suspend(struct platform_device *pdev, pm_message_t state)
{
struct ohci_hcd *ohci = platform_get_drvdata(pdev);
struct usb_hcd *hcd = platform_get_drvdata(pdev);
struct ohci_hcd *ohci = hcd_to_ohci(hcd);

if (time_before(jiffies, ohci->next_statechange))
msleep(5);
ohci->next_statechange = jiffies;

pxa27x_stop_hc(&pdev->dev);
ohci_to_hcd(ohci)->state = HC_STATE_SUSPENDED;
hcd->state = HC_STATE_SUSPENDED;
pdev->dev.power.power_state = PMSG_SUSPEND;

return 0;
}

static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev)
{
struct ohci_hcd *ohci = platform_get_drvdata(pdev);
struct usb_hcd *hcd = platform_get_drvdata(pdev);
struct ohci_hcd *ohci = hcd_to_ohci(hcd);
int status;

if (time_before(jiffies, ohci->next_statechange))
Expand All @@ -341,7 +344,7 @@ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev)
return status;

pdev->dev.power.power_state = PMSG_ON;
usb_hcd_resume_root_hub(platform_get_drvdata(pdev));
usb_hcd_resume_root_hub(hcd);

return 0;
}
Expand Down

0 comments on commit 0b32db6

Please sign in to comment.