On Thu, 12 May 2011 21:21:48 +0800 Jekyll Lai <[email protected]> wrote:
> 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) { I would think the otg is a run_wake device, even though we have not marked it run_wake with a quirk (i guess no one checks that so far). So why do we need this check? _______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
