From 5c605f06dd6da490028241c68ec2be3180edcf27 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Thu, 11 Apr 2013 11:24:39 +0200 Subject: [PATCH] --- yaml --- r: 363211 b: refs/heads/master c: 1c9354b0973a59a0292ec64e0b4dde7b9462931a h: refs/heads/master i: 363209: 2b158ce8d2edbc5cf7aba53f2b13e60e13aeaf54 363207: 3f1d23853b60d8eab15a7d898b8c969d31d12352 v: v3 --- [refs] | 2 +- trunk/drivers/misc/apds9802als.c | 25 ++++--------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index c12eff154435..9a00c214df57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a42f82f57a6411c89538a8c0a44150f67e449a4a +refs/heads/master: 1c9354b0973a59a0292ec64e0b4dde7b9462931a diff --git a/trunk/drivers/misc/apds9802als.c b/trunk/drivers/misc/apds9802als.c index d648b0893027..5b5fd8416b3e 100644 --- a/trunk/drivers/misc/apds9802als.c +++ b/trunk/drivers/misc/apds9802als.c @@ -272,19 +272,8 @@ 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); @@ -292,7 +281,7 @@ static int apds9802als_runtime_suspend(struct device *dev) 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); @@ -300,16 +289,12 @@ static int apds9802als_runtime_resume(struct device *dev) 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 */ @@ -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, };