aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/power/pda_power.c10
-rw-r--r--include/linux/pda_power.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
index a232de6a5703..69f8aa3a6a4b 100644
--- a/drivers/power/pda_power.c
+++ b/drivers/power/pda_power.c
@@ -404,6 +404,13 @@ static int usb_wakeup_enabled;
404 404
405static int pda_power_suspend(struct platform_device *pdev, pm_message_t state) 405static int pda_power_suspend(struct platform_device *pdev, pm_message_t state)
406{ 406{
407 if (pdata->suspend) {
408 int ret = pdata->suspend(state);
409
410 if (ret)
411 return ret;
412 }
413
407 if (device_may_wakeup(&pdev->dev)) { 414 if (device_may_wakeup(&pdev->dev)) {
408 if (ac_irq) 415 if (ac_irq)
409 ac_wakeup_enabled = !enable_irq_wake(ac_irq->start); 416 ac_wakeup_enabled = !enable_irq_wake(ac_irq->start);
@@ -423,6 +430,9 @@ static int pda_power_resume(struct platform_device *pdev)
423 disable_irq_wake(ac_irq->start); 430 disable_irq_wake(ac_irq->start);
424 } 431 }
425 432
433 if (pdata->resume)
434 return pdata->resume();
435
426 return 0; 436 return 0;
427} 437}
428#else 438#else
diff --git a/include/linux/pda_power.h b/include/linux/pda_power.h
index d4cf7a2ceb3e..c9e4d814ff77 100644
--- a/include/linux/pda_power.h
+++ b/include/linux/pda_power.h
@@ -24,6 +24,8 @@ struct pda_power_pdata {
24 int (*is_usb_online)(void); 24 int (*is_usb_online)(void);
25 void (*set_charge)(int flags); 25 void (*set_charge)(int flags);
26 void (*exit)(struct device *dev); 26 void (*exit)(struct device *dev);
27 int (*suspend)(pm_message_t state);
28 int (*resume)(void);
27 29
28 char **supplied_to; 30 char **supplied_to;
29 size_t num_supplicants; 31 size_t num_supplicants;