Commit 875887c3 authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Greg Kroah-Hartman

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: default avatarVaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aa6432f1
...@@ -1112,12 +1112,11 @@ static int synaptics_rmi4_resume(struct device *dev) ...@@ -1112,12 +1112,11 @@ static int synaptics_rmi4_resume(struct device *dev)
return 0; return 0;
} }
static const struct dev_pm_ops synaptics_rmi4_dev_pm_ops = {
.suspend = synaptics_rmi4_suspend,
.resume = synaptics_rmi4_resume,
};
#endif #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[] = { static const struct i2c_device_id synaptics_rmi4_id_table[] = {
{ DRIVER_NAME, 0 }, { DRIVER_NAME, 0 },
{ }, { },
...@@ -1128,9 +1127,7 @@ static struct i2c_driver synaptics_rmi4_driver = { ...@@ -1128,9 +1127,7 @@ static struct i2c_driver synaptics_rmi4_driver = {
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &synaptics_rmi4_dev_pm_ops, .pm = &synaptics_rmi4_dev_pm_ops,
#endif
}, },
.probe = synaptics_rmi4_probe, .probe = synaptics_rmi4_probe,
.remove = synaptics_rmi4_remove, .remove = synaptics_rmi4_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment