diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2010-11-03 22:13:47 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 18:27:00 (GMT) |
commit | cb7bbc7a5535ab2333915b83391e1d846a0914df (patch) | |
tree | 07d88b56c87b9a1ff2764b25d47c102169d665ca /drivers/net/wireless/wl1251/main.c | |
parent | f81c1f48384d398dbe8f6c5b10377c7158086791 (diff) | |
download | linux-cb7bbc7a5535ab2333915b83391e1d846a0914df.tar.xz |
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/main.c')
-rw-r--r-- | drivers/net/wireless/wl1251/main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c index 7a87625..012e1a4 100644 --- a/drivers/net/wireless/wl1251/main.c +++ b/drivers/net/wireless/wl1251/main.c @@ -52,14 +52,14 @@ void wl1251_disable_interrupts(struct wl1251 *wl) wl->if_ops->disable_irq(wl); } -static void wl1251_power_off(struct wl1251 *wl) +static int wl1251_power_off(struct wl1251 *wl) { - wl->set_power(false); + return wl->if_ops->power(wl, false); } -static void wl1251_power_on(struct wl1251 *wl) +static int wl1251_power_on(struct wl1251 *wl) { - wl->set_power(true); + return wl->if_ops->power(wl, true); } static int wl1251_fetch_firmware(struct wl1251 *wl) @@ -152,9 +152,12 @@ static void wl1251_fw_wakeup(struct wl1251 *wl) static int wl1251_chip_wakeup(struct wl1251 *wl) { - int ret = 0; + int ret; + + ret = wl1251_power_on(wl); + if (ret < 0) + return ret; - wl1251_power_on(wl); msleep(WL1251_POWER_ON_SLEEP); wl->if_ops->reset(wl); |