Fixed the system crash when inserting or removing otg cable.
Signed-off-by: Jekyll Lai <[email protected]>
---
drivers/usb/otg/langwell_otg.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/otg/langwell_otg.c b/drivers/usb/otg/langwell_otg.c
index ae7a51f..47d6bb0 100644
--- a/drivers/usb/otg/langwell_otg.c
+++ b/drivers/usb/otg/langwell_otg.c
@@ -2128,7 +2128,8 @@ static int langwell_otg_probe(struct pci_dev *pdev,
if (lnw->iotg.otg.state == OTG_STATE_A_IDLE)
langwell_update_transceiver();
- pm_runtime_put_noidle(&pdev->dev);
+ if (pci_dev_run_wake(&pdev->dev))
+ pm_runtime_put_noidle(&pdev->dev);
pm_runtime_allow(&pdev->dev);
return 0;
@@ -2144,7 +2145,8 @@ static void langwell_otg_remove(struct pci_dev *pdev)
{
struct langwell_otg *lnw = the_transceiver;
- pm_runtime_get_noresume(&pdev->dev);
+ if (pci_dev_run_wake(&pdev->dev))
+ pm_runtime_get_noresume(&pdev->dev);
pm_runtime_forbid(&pdev->dev);
if (lnw->qwork) {
--
1.7.0.4
_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel