提交 c538ddbe 编写于 作者: M Mark Brown 提交者: Samuel Ortiz

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: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 735a3d9e
......@@ -94,9 +94,9 @@ static int wm831x_i2c_remove(struct i2c_client *i2c)
return 0;
}
static int wm831x_i2c_suspend(struct i2c_client *i2c, pm_message_t mesg)
static int wm831x_i2c_suspend(struct device *dev)
{
struct wm831x *wm831x = i2c_get_clientdata(i2c);
struct wm831x *wm831x = dev_get_drvdata(dev);
return wm831x_device_suspend(wm831x);
}
......@@ -113,15 +113,18 @@ static const struct i2c_device_id wm831x_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, wm831x_i2c_id);
static const struct dev_pm_ops wm831x_pm_ops = {
.suspend = wm831x_i2c_suspend,
};
static struct i2c_driver wm831x_i2c_driver = {
.driver = {
.name = "wm831x",
.owner = THIS_MODULE,
.name = "wm831x",
.owner = THIS_MODULE,
.pm = &wm831x_pm_ops,
},
.probe = wm831x_i2c_probe,
.remove = wm831x_i2c_remove,
.suspend = wm831x_i2c_suspend,
.id_table = wm831x_i2c_id,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册