diff options
Diffstat (limited to 'drivers/mfd/wm831x-i2c.c')
-rw-r--r-- | drivers/mfd/wm831x-i2c.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/mfd/wm831x-i2c.c b/drivers/mfd/wm831x-i2c.c index 156b19859e81..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 | ||
97 | static int wm831x_i2c_suspend(struct i2c_client *i2c, pm_message_t mesg) | 97 | static 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 | } |
@@ -108,19 +108,23 @@ static const struct i2c_device_id wm831x_i2c_id[] = { | |||
108 | { "wm8320", WM8320 }, | 108 | { "wm8320", WM8320 }, |
109 | { "wm8321", WM8321 }, | 109 | { "wm8321", WM8321 }, |
110 | { "wm8325", WM8325 }, | 110 | { "wm8325", WM8325 }, |
111 | { "wm8326", WM8326 }, | ||
111 | { } | 112 | { } |
112 | }; | 113 | }; |
113 | MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id); | 114 | MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id); |
114 | 115 | ||
116 | static const struct dev_pm_ops wm831x_pm_ops = { | ||
117 | .suspend = wm831x_i2c_suspend, | ||
118 | }; | ||
115 | 119 | ||
116 | static struct i2c_driver wm831x_i2c_driver = { | 120 | static struct i2c_driver wm831x_i2c_driver = { |
117 | .driver = { | 121 | .driver = { |
118 | .name = "wm831x", | 122 | .name = "wm831x", |
119 | .owner = THIS_MODULE, | 123 | .owner = THIS_MODULE, |
124 | .pm = &wm831x_pm_ops, | ||
120 | }, | 125 | }, |
121 | .probe = wm831x_i2c_probe, | 126 | .probe = wm831x_i2c_probe, |
122 | .remove = wm831x_i2c_remove, | 127 | .remove = wm831x_i2c_remove, |
123 | .suspend = wm831x_i2c_suspend, | ||
124 | .id_table = wm831x_i2c_id, | 128 | .id_table = wm831x_i2c_id, |
125 | }; | 129 | }; |
126 | 130 | ||