Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309672
b: refs/heads/master
c: 48e41c7
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov committed May 5, 2012
1 parent 6f6d1f9 commit f126517
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 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: 48bc177441d68c0ba70631beb544c3d695328d56
refs/heads/master: 48e41c70c10f10541d922fc67e7952f06ad59d9a
20 changes: 11 additions & 9 deletions trunk/drivers/power/max17042_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,8 @@ static int max17042_suspend(struct device *dev)
{
struct max17042_chip *chip = dev_get_drvdata(dev);

/* disable the irq and enable irq_wake
/*
* disable the irq and enable irq_wake
* capability to the interrupt line.
*/
if (chip->client->irq) {
Expand All @@ -751,9 +752,15 @@ static int max17042_resume(struct device *dev)

return 0;
}

static const struct dev_pm_ops max17042_pm_ops = {
.suspend = max17042_suspend,
.resume = max17042_resume,
};

#define MAX17042_PM_OPS (&max17042_pm_ops)
#else
#define max17042_suspend NULL
#define max17042_resume NULL
#define MAX17042_PM_OPS NULL
#endif

#ifdef CONFIG_OF
Expand All @@ -770,16 +777,11 @@ static const struct i2c_device_id max17042_id[] = {
};
MODULE_DEVICE_TABLE(i2c, max17042_id);

static const struct dev_pm_ops max17042_pm_ops = {
.suspend = max17042_suspend,
.resume = max17042_resume,
};

static struct i2c_driver max17042_i2c_driver = {
.driver = {
.name = "max17042",
.of_match_table = of_match_ptr(max17042_dt_match),
.pm = &max17042_pm_ops,
.pm = MAX17042_PM_OPS,
},
.probe = max17042_probe,
.remove = __devexit_p(max17042_remove),
Expand Down

0 comments on commit f126517

Please sign in to comment.