Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165515
b: refs/heads/master
c: 83a8af0
h: refs/heads/master
i:
  165513: f1d258e
  165511: 1698114
v: v3
  • Loading branch information
Marek Vasut authored and Anton Vorontsov committed Sep 4, 2009
1 parent ebbb82a commit 019bec5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c87942aef52d2120e95ff1dec739998b9f95a78
refs/heads/master: 83a8af0d31cfa6c728a68c00f6b1b518e2dcc03d
17 changes: 10 additions & 7 deletions trunk/drivers/power/wm97xx_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,22 @@ static irqreturn_t wm97xx_chrg_irq(int irq, void *data)
}

#ifdef CONFIG_PM
static int wm97xx_bat_suspend(struct platform_device *dev, pm_message_t state)
static int wm97xx_bat_suspend(struct device *dev)
{
flush_scheduled_work();
return 0;
}

static int wm97xx_bat_resume(struct platform_device *dev)
static int wm97xx_bat_resume(struct device *dev)
{
schedule_work(&bat_work);
return 0;
}
#else
#define wm97xx_bat_suspend NULL
#define wm97xx_bat_resume NULL

static struct dev_pm_ops wm97xx_bat_pm_ops = {
.suspend = wm97xx_bat_suspend,
.resume = wm97xx_bat_resume,
};
#endif

static int __devinit wm97xx_bat_probe(struct platform_device *dev)
Expand Down Expand Up @@ -281,11 +283,12 @@ static struct platform_driver wm97xx_bat_driver = {
.driver = {
.name = "wm97xx-battery",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &wm97xx_bat_pm_ops,
#endif
},
.probe = wm97xx_bat_probe,
.remove = __devexit_p(wm97xx_bat_remove),
.suspend = wm97xx_bat_suspend,
.resume = wm97xx_bat_resume,
};

static int __init wm97xx_bat_init(void)
Expand Down

0 comments on commit 019bec5

Please sign in to comment.