X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=drivers%2Fmfd%2Fwm831x-i2c.c;h=3853fa8e7cc267dd4496a1e9101c79fc6f2c9082;hb=52fc43f7c1c416b114e88ff39635c36e67ef15b6;hp=156b19859e81701d57090f2f522f43238c987604;hpb=478b2a34e7d496b0cc3ae7696362740f954c91ba;p=cascardo%2Flinux.git 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) 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); } @@ -108,19 +108,23 @@ static const struct i2c_device_id wm831x_i2c_id[] = { { "wm8320", WM8320 }, { "wm8321", WM8321 }, { "wm8325", WM8325 }, + { "wm8326", WM8326 }, { } }; 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, };