diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2010-11-04 00:13:47 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 13:27:00 -0500 |
commit | cb7bbc7a5535ab2333915b83391e1d846a0914df (patch) | |
tree | 07d88b56c87b9a1ff2764b25d47c102169d665ca /drivers/net/wireless/wl1251/sdio.c | |
parent | f81c1f48384d398dbe8f6c5b10377c7158086791 (diff) | |
download | op-kernel-dev-cb7bbc7a5535ab2333915b83391e1d846a0914df.zip op-kernel-dev-cb7bbc7a5535ab2333915b83391e1d846a0914df.tar.gz |
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/sdio.c')
-rw-r--r-- | drivers/net/wireless/wl1251/sdio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c index 74ba9ce..0285190 100644 --- a/drivers/net/wireless/wl1251/sdio.c +++ b/drivers/net/wireless/wl1251/sdio.c @@ -171,8 +171,12 @@ static void wl1251_disable_line_irq(struct wl1251 *wl) return disable_irq(wl->irq); } -static void wl1251_sdio_set_power(bool enable) +static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable) { + if (wl->set_power) + wl->set_power(enable); + + return 0; } static struct wl1251_if_operations wl1251_sdio_ops = { @@ -181,6 +185,7 @@ static struct wl1251_if_operations wl1251_sdio_ops = { .write_elp = wl1251_sdio_write_elp, .read_elp = wl1251_sdio_read_elp, .reset = wl1251_sdio_reset, + .power = wl1251_sdio_set_power, }; static int wl1251_platform_probe(struct platform_device *pdev) @@ -239,7 +244,6 @@ static int wl1251_sdio_probe(struct sdio_func *func, wl_sdio->func = func; wl->if_priv = wl_sdio; wl->if_ops = &wl1251_sdio_ops; - wl->set_power = wl1251_sdio_set_power; if (wl12xx_board_data != NULL) { wl->set_power = wl12xx_board_data->set_power; |