Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363211
b: refs/heads/master
c: 1c9354b
h: refs/heads/master
i:
  363209: 2b158ce
  363207: 3f1d238
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent 5542bd9 commit 5c605f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 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: a42f82f57a6411c89538a8c0a44150f67e449a4a
refs/heads/master: 1c9354b0973a59a0292ec64e0b4dde7b9462931a
25 changes: 4 additions & 21 deletions trunk/drivers/misc/apds9802als.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,44 +272,29 @@ static int apds9802als_remove(struct i2c_client *client)
}

#ifdef CONFIG_PM
static int apds9802als_suspend(struct i2c_client *client, pm_message_t mesg)
{
als_set_power_state(client, false);
return 0;
}

static int apds9802als_resume(struct i2c_client *client)
{
als_set_default_config(client);
return 0;
}

static int apds9802als_runtime_suspend(struct device *dev)
static int apds9802als_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);

als_set_power_state(client, false);
return 0;
}

static int apds9802als_runtime_resume(struct device *dev)
static int apds9802als_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);

als_set_power_state(client, true);
return 0;
}

static const struct dev_pm_ops apds9802als_pm_ops = {
.runtime_suspend = apds9802als_runtime_suspend,
.runtime_resume = apds9802als_runtime_resume,
};
static UNIVERSAL_DEV_PM_OPS(apds9802als_pm_ops, apds9802als_suspend,
apds9802als_resume, NULL);

#define APDS9802ALS_PM_OPS (&apds9802als_pm_ops)

#else /* CONFIG_PM */
#define apds9802als_suspend NULL
#define apds9802als_resume NULL
#define APDS9802ALS_PM_OPS NULL
#endif /* CONFIG_PM */

Expand All @@ -327,8 +312,6 @@ static struct i2c_driver apds9802als_driver = {
},
.probe = apds9802als_probe,
.remove = apds9802als_remove,
.suspend = apds9802als_suspend,
.resume = apds9802als_resume,
.id_table = apds9802als_id,
};

Expand Down

0 comments on commit 5c605f0

Please sign in to comment.