Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198146
b: refs/heads/master
c: a3bcbbe
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Anton Vorontsov committed Apr 16, 2010
1 parent 143246d commit bd36895
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5874f33bbaf00586d05de37706491ee37057e11
refs/heads/master: a3bcbbee83f55cbaec9b2ad748e7300c7feb2192
10 changes: 10 additions & 0 deletions trunk/drivers/power/pda_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/pda_power.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ struct pda_power_pdata {
int (*is_usb_online)(void);
void (*set_charge)(int flags);
void (*exit)(struct device *dev);
int (*suspend)(pm_message_t state);
int (*resume)(void);

char **supplied_to;
size_t num_supplicants;
Expand Down

0 comments on commit bd36895

Please sign in to comment.