penwell_otg: enable runtime_pm
authorKristen Carlson Accardi <kristen@linux.intel.com>
Fri, 26 Aug 2011 10:55:08 +0000 (11:55 +0100)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 21:15:35 +0000 (13:15 -0800)
runtime_pm was already implemented, but not enabled at probe.

Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
drivers/usb/otg/penwell_otg.c

index 400f6d9..4a702ce 100644 (file)
@@ -2903,6 +2903,9 @@ static int penwell_otg_probe(struct pci_dev *pdev,
        if (pnw->iotg.otg.state == OTG_STATE_A_IDLE)
                queue_work(pnw->qwork, &pnw->work);
 
+       pm_runtime_put_noidle(&pdev->dev);
+       pm_runtime_allow(&pdev->dev);
+
        return 0;
 
 err:
@@ -2916,6 +2919,9 @@ static void penwell_otg_remove(struct pci_dev *pdev)
 {
        struct penwell_otg *pnw = the_transceiver;
 
+       pm_runtime_get_noresume(&pdev->dev);
+       pm_runtime_forbid(&pdev->dev);
+
        if (pnw->qwork) {
                flush_workqueue(pnw->qwork);
                destroy_workqueue(pnw->qwork);