diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-03-20 12:47:51 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-20 13:37:31 +0100 |
commit | 875887c3086a6e130beb73cd12b737c1296eb946 (patch) | |
tree | 9c9105dd313b506763a5a013c412d91f5c889326 /drivers/staging/ste_rmi4 | |
parent | aa6432f122434a79253b07c87f292eff982bd71e (diff) |
Staging: ste_rmi4: Use SIMPLE_DEV_PM_OPS() macro
Macro SIMPLE_DEV_PM_OPS() can be used when same suspend
and resume callbacks are used for suspend to RAM and
hibernation. So, here use SIMPLE_DEV_PM_OPS to make code
shorter and cleaner.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ste_rmi4')
-rw-r--r-- | drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index 6385b336bd0d..0f524bb7b41d 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -1112,12 +1112,11 @@ static int synaptics_rmi4_resume(struct device *dev) return 0; } -static const struct dev_pm_ops synaptics_rmi4_dev_pm_ops = { - .suspend = synaptics_rmi4_suspend, - .resume = synaptics_rmi4_resume, -}; #endif +static SIMPLE_DEV_PM_OPS(synaptics_rmi4_dev_pm_ops, synaptics_rmi4_suspend, + synaptics_rmi4_resume); + static const struct i2c_device_id synaptics_rmi4_id_table[] = { { DRIVER_NAME, 0 }, { }, @@ -1128,9 +1127,7 @@ static struct i2c_driver synaptics_rmi4_driver = { .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, -#ifdef CONFIG_PM .pm = &synaptics_rmi4_dev_pm_ops, -#endif }, .probe = synaptics_rmi4_probe, .remove = synaptics_rmi4_remove, |