aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-spi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-08 13:51:25 -0500
committerLee Jones <lee.jones@linaro.org>2014-01-21 03:27:51 -0500
commitb9736a16a41758caa684d85d4f1398bbd9f594d7 (patch)
tree89ca3fcda288249d4b2f77d9a8598be27c8fd8dd /drivers/mfd/wm831x-spi.c
parented83d301eac2ca7c1315d0e283e1c14c07a53e16 (diff)
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)
66 return wm831x_device_suspend(wm831x); 66 return wm831x_device_suspend(wm831x);
67} 67}
68 68
69static void wm831x_spi_shutdown(struct spi_device *spi) 69static int wm831x_spi_poweroff(struct device *dev)
70{ 70{
71 struct wm831x *wm831x = spi_get_drvdata(spi); 71 struct wm831x *wm831x = dev_get_drvdata(dev);
72 72
73 wm831x_device_shutdown(wm831x); 73 wm831x_device_shutdown(wm831x);
74
75 return 0;
74} 76}
75 77
76static const struct dev_pm_ops wm831x_spi_pm = { 78static const struct dev_pm_ops wm831x_spi_pm = {
77 .freeze = wm831x_spi_suspend, 79 .freeze = wm831x_spi_suspend,
78 .suspend = wm831x_spi_suspend, 80 .suspend = wm831x_spi_suspend,
81 .poweroff = wm831x_spi_poweroff,
79}; 82};
80 83
81static const struct spi_device_id wm831x_spi_ids[] = { 84static const struct spi_device_id wm831x_spi_ids[] = {
@@ -99,7 +102,6 @@ static struct spi_driver wm831x_spi_driver = {
99 .id_table = wm831x_spi_ids, 102 .id_table = wm831x_spi_ids,
100 .probe = wm831x_spi_probe, 103 .probe = wm831x_spi_probe,
101 .remove = wm831x_spi_remove, 104 .remove = wm831x_spi_remove,
102 .shutdown = wm831x_spi_shutdown,
103}; 105};
104 106
105static int __init wm831x_spi_init(void) 107static int __init wm831x_spi_init(void)