aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-i2c.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-05 10:12:39 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-01-14 06:38:17 -0500
commitc538ddbe4fc70ef97af02d57abad34b246b19082 (patch)
treee6f41e7217194e9d48d6f5b2b72e39f280eb2b23 /drivers/mfd/wm831x-i2c.c
parent735a3d9efdc5aeebe201008e6655b235c7f02aeb (diff)
mfd: Convert WM831x away from legacy I2C PM operations
Since the legacy bus PM operations are deprecated move the suspend method over to dev_pm_ops. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm831x-i2c.c')
-rw-r--r--drivers/mfd/wm831x-i2c.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/mfd/wm831x-i2c.c b/drivers/mfd/wm831x-i2c.c
index 38be5201c783..3853fa8e7cc2 100644
--- a/drivers/mfd/wm831x-i2c.c
+++ b/drivers/mfd/wm831x-i2c.c
@@ -94,9 +94,9 @@ static int wm831x_i2c_remove(struct i2c_client *i2c)
94 return 0; 94 return 0;
95} 95}
96 96
97static int wm831x_i2c_suspend(struct i2c_client *i2c, pm_message_t mesg) 97static int wm831x_i2c_suspend(struct device *dev)
98{ 98{
99 struct wm831x *wm831x = i2c_get_clientdata(i2c); 99 struct wm831x *wm831x = dev_get_drvdata(dev);
100 100
101 return wm831x_device_suspend(wm831x); 101 return wm831x_device_suspend(wm831x);
102} 102}
@@ -113,15 +113,18 @@ static const struct i2c_device_id wm831x_i2c_id[] = {
113}; 113};
114MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id); 114MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id);
115 115
116static const struct dev_pm_ops wm831x_pm_ops = {
117 .suspend = wm831x_i2c_suspend,
118};
116 119
117static struct i2c_driver wm831x_i2c_driver = { 120static struct i2c_driver wm831x_i2c_driver = {
118 .driver = { 121 .driver = {
119 .name = "wm831x", 122 .name = "wm831x",
120 .owner = THIS_MODULE, 123 .owner = THIS_MODULE,
124 .pm = &wm831x_pm_ops,
121 }, 125 },
122 .probe = wm831x_i2c_probe, 126 .probe = wm831x_i2c_probe,
123 .remove = wm831x_i2c_remove, 127 .remove = wm831x_i2c_remove,
124 .suspend = wm831x_i2c_suspend,
125 .id_table = wm831x_i2c_id, 128 .id_table = wm831x_i2c_id,
126}; 129};
127 130