Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[cascardo/linux.git] / drivers / power / pda_power.c
index a232de6..69f8aa3 100644 (file)
@@ -404,6 +404,13 @@ static int usb_wakeup_enabled;
 
 static int pda_power_suspend(struct platform_device *pdev, pm_message_t state)
 {
+       if (pdata->suspend) {
+               int ret = pdata->suspend(state);
+
+               if (ret)
+                       return ret;
+       }
+
        if (device_may_wakeup(&pdev->dev)) {
                if (ac_irq)
                        ac_wakeup_enabled = !enable_irq_wake(ac_irq->start);
@@ -423,6 +430,9 @@ static int pda_power_resume(struct platform_device *pdev)
                        disable_irq_wake(ac_irq->start);
        }
 
+       if (pdata->resume)
+               return pdata->resume();
+
        return 0;
 }
 #else