--- zzzz-none-000/linux-3.10.107/drivers/mfd/wm831x-i2c.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/mfd/wm831x-i2c.c 2021-02-04 17:41:59.000000000 +0000 @@ -64,11 +64,13 @@ return wm831x_device_suspend(wm831x); } -static void wm831x_i2c_shutdown(struct i2c_client *i2c) +static int wm831x_i2c_poweroff(struct device *dev) { - struct wm831x *wm831x = i2c_get_clientdata(i2c); + struct wm831x *wm831x = dev_get_drvdata(dev); wm831x_device_shutdown(wm831x); + + return 0; } static const struct i2c_device_id wm831x_i2c_id[] = { @@ -85,17 +87,16 @@ static const struct dev_pm_ops wm831x_pm_ops = { .suspend = wm831x_i2c_suspend, + .poweroff = wm831x_i2c_poweroff, }; static struct i2c_driver wm831x_i2c_driver = { .driver = { .name = "wm831x", - .owner = THIS_MODULE, .pm = &wm831x_pm_ops, }, .probe = wm831x_i2c_probe, .remove = wm831x_i2c_remove, - .shutdown = wm831x_i2c_shutdown, .id_table = wm831x_i2c_id, };