summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl1251/spi.c
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2010-11-04 00:13:47 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:27:00 -0500
commitcb7bbc7a5535ab2333915b83391e1d846a0914df (patch)
tree07d88b56c87b9a1ff2764b25d47c102169d665ca /drivers/net/wireless/wl1251/spi.c
parentf81c1f48384d398dbe8f6c5b10377c7158086791 (diff)
wl1251: add power callback to wl1251_if_operations
Call interface specific power callback before calling board specific one. Also allow that callback to fail. This is how it's done for wl1271 and will be used for runtime_pm support. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl1251/spi.c')
-rw-r--r--drivers/net/wireless/wl1251/spi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl1251/spi.c b/drivers/net/wireless/wl1251/spi.c
index 88fa8e69d0d..ac872b38960 100644
--- a/drivers/net/wireless/wl1251/spi.c
+++ b/drivers/net/wireless/wl1251/spi.c
@@ -215,12 +215,21 @@ static void wl1251_spi_disable_irq(struct wl1251 *wl)
return disable_irq(wl->irq);
}
+static int wl1251_spi_set_power(struct wl1251 *wl, bool enable)
+{
+ if (wl->set_power)
+ wl->set_power(enable);
+
+ return 0;
+}
+
static const struct wl1251_if_operations wl1251_spi_ops = {
.read = wl1251_spi_read,
.write = wl1251_spi_write,
.reset = wl1251_spi_reset_wake,
.enable_irq = wl1251_spi_enable_irq,
.disable_irq = wl1251_spi_disable_irq,
+ .power = wl1251_spi_set_power,
};
static int __devinit wl1251_spi_probe(struct spi_device *spi)