Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284593
b: refs/heads/master
c: 5214e56
h: refs/heads/master
i:
  284591: d640d6a
v: v3
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Jan 8, 2012
1 parent c870a3f commit cd9282e
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 953c7d025d97916e56fd6f1bd347e1c19fd7d5f5
refs/heads/master: 5214e5659a9760cd01aa14171c8fdf38d3deec3a
19 changes: 10 additions & 9 deletions trunk/drivers/mfd/aat2870-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,18 +468,20 @@ static int aat2870_i2c_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
static int aat2870_i2c_suspend(struct i2c_client *client, pm_message_t state)
#ifdef CONFIG_PM_SLEEP
static int aat2870_i2c_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct aat2870_data *aat2870 = i2c_get_clientdata(client);

aat2870_disable(aat2870);

return 0;
}

static int aat2870_i2c_resume(struct i2c_client *client)
static int aat2870_i2c_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct aat2870_data *aat2870 = i2c_get_clientdata(client);
struct aat2870_register *reg = NULL;
int i;
Expand All @@ -495,10 +497,10 @@ static int aat2870_i2c_resume(struct i2c_client *client)

return 0;
}
#else
#define aat2870_i2c_suspend NULL
#define aat2870_i2c_resume NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static SIMPLE_DEV_PM_OPS(aat2870_pm_ops, aat2870_i2c_suspend,
aat2870_i2c_resume);

static const struct i2c_device_id aat2870_i2c_id_table[] = {
{ "aat2870", 0 },
Expand All @@ -510,11 +512,10 @@ static struct i2c_driver aat2870_i2c_driver = {
.driver = {
.name = "aat2870",
.owner = THIS_MODULE,
.pm = &aat2870_pm_ops,
},
.probe = aat2870_i2c_probe,
.remove = aat2870_i2c_remove,
.suspend = aat2870_i2c_suspend,
.resume = aat2870_i2c_resume,
.id_table = aat2870_i2c_id_table,
};

Expand Down

0 comments on commit cd9282e

Please sign in to comment.