--- zzzz-none-000/linux-3.10.107/drivers/mfd/wm831x-spi.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/mfd/wm831x-spi.c 2021-02-04 17:41:59.000000000 +0000 @@ -34,7 +34,6 @@ if (wm831x == NULL) return -ENOMEM; - spi->bits_per_word = 16; spi->mode = SPI_MODE_0; spi_set_drvdata(spi, wm831x); @@ -67,16 +66,19 @@ return wm831x_device_suspend(wm831x); } -static void wm831x_spi_shutdown(struct spi_device *spi) +static int wm831x_spi_poweroff(struct device *dev) { - struct wm831x *wm831x = spi_get_drvdata(spi); + struct wm831x *wm831x = dev_get_drvdata(dev); wm831x_device_shutdown(wm831x); + + return 0; } static const struct dev_pm_ops wm831x_spi_pm = { .freeze = wm831x_spi_suspend, .suspend = wm831x_spi_suspend, + .poweroff = wm831x_spi_poweroff, }; static const struct spi_device_id wm831x_spi_ids[] = { @@ -94,13 +96,11 @@ static struct spi_driver wm831x_spi_driver = { .driver = { .name = "wm831x", - .owner = THIS_MODULE, .pm = &wm831x_spi_pm, }, .id_table = wm831x_spi_ids, .probe = wm831x_spi_probe, .remove = wm831x_spi_remove, - .shutdown = wm831x_spi_shutdown, }; static int __init wm831x_spi_init(void)