summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-spi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-08 18:51:25 +0000
committerLee Jones <lee.jones@linaro.org>2014-01-21 08:27:51 +0000
commitb9736a16a41758caa684d85d4f1398bbd9f594d7 (patch)
tree89ca3fcda288249d4b2f77d9a8598be27c8fd8dd /drivers/mfd/wm831x-spi.c
parented83d301eac2ca7c1315d0e283e1c14c07a53e16 (diff)
downloadlinux-stable-b9736a16a41758caa684d85d4f1398bbd9f594d7.tar.gz
linux-stable-b9736a16a41758caa684d85d4f1398bbd9f594d7.tar.bz2
linux-stable-b9736a16a41758caa684d85d4f1398bbd9f594d7.zip
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>
Diffstat (limited to 'drivers/mfd/wm831x-spi.c')
-rw-r--r--drivers/mfd/wm831x-spi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mfd/wm831x-spi.c b/drivers/mfd/wm831x-spi.c
index 07de3cc5a0d9..b8a5e3b34ec7 100644
--- a/drivers/mfd/wm831x-spi.c
+++ b/drivers/mfd/wm831x-spi.c
@@ -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)