mfd: wm831x: Use PM ops for shutdown

This helps move us towards removing the bus custom operations.

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Mark Brown
2013-11-08 18:51:25 +00:00
committed by Lee Jones
parent ed83d301ea
commit b9736a16a4
2 changed files with 10 additions and 6 deletions

View File

@@ -66,16 +66,19 @@ static int wm831x_spi_suspend(struct device *dev)
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[] = {
@@ -99,7 +102,6 @@ static struct spi_driver wm831x_spi_driver = {
.id_table = wm831x_spi_ids,
.probe = wm831x_spi_probe,
.remove = wm831x_spi_remove,
.shutdown = wm831x_spi_shutdown,
};
static int __init wm831x_spi_init(void)