Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363214
b: refs/heads/master
c: a776102
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent 3bc2f59 commit 21a4d0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: 873bf4f46c7ab9b97da7458029e5e7b645578dfe
refs/heads/master: a7761027656dc192b59617a6eb961e38097419ce
21 changes: 11 additions & 10 deletions trunk/drivers/misc/tsl2550.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,24 +417,26 @@ static int tsl2550_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP

static int tsl2550_suspend(struct i2c_client *client, pm_message_t mesg)
static int tsl2550_suspend(struct device *dev)
{
return tsl2550_set_power_state(client, 0);
return tsl2550_set_power_state(to_i2c_client(dev), 0);
}

static int tsl2550_resume(struct i2c_client *client)
static int tsl2550_resume(struct device *dev)
{
return tsl2550_set_power_state(client, 1);
return tsl2550_set_power_state(to_i2c_client(dev), 1);
}

static SIMPLE_DEV_PM_OPS(tsl2550_pm_ops, tsl2550_suspend, tsl2550_resume);
#define TSL2550_PM_OPS (&tsl2550_pm_ops)

#else

#define tsl2550_suspend NULL
#define tsl2550_resume NULL
#define TSL2550_PM_OPS NULL

#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static const struct i2c_device_id tsl2550_id[] = {
{ "tsl2550", 0 },
Expand All @@ -446,9 +448,8 @@ static struct i2c_driver tsl2550_driver = {
.driver = {
.name = TSL2550_DRV_NAME,
.owner = THIS_MODULE,
.pm = TSL2550_PM_OPS,
},
.suspend = tsl2550_suspend,
.resume = tsl2550_resume,
.probe = tsl2550_probe,
.remove = tsl2550_remove,
.id_table = tsl2550_id,
Expand Down

0 comments on commit 21a4d0c

Please sign in to comment.