diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_sdio.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_sdio.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c b/drivers/net/wireless/wl12xx/wl1271_sdio.c index b5d9565f659f..1d5dc727167d 100644 --- a/drivers/net/wireless/wl12xx/wl1271_sdio.c +++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c | |||
@@ -159,35 +159,38 @@ static void wl1271_sdio_raw_write(struct wl1271 *wl, int addr, void *buf, | |||
159 | wl1271_error("sdio write failed (%d)", ret); | 159 | wl1271_error("sdio write failed (%d)", ret); |
160 | } | 160 | } |
161 | 161 | ||
162 | static void wl1271_sdio_power_on(struct wl1271 *wl) | 162 | static int wl1271_sdio_power_on(struct wl1271 *wl) |
163 | { | 163 | { |
164 | struct sdio_func *func = wl_to_func(wl); | 164 | struct sdio_func *func = wl_to_func(wl); |
165 | 165 | ||
166 | sdio_claim_host(func); | 166 | sdio_claim_host(func); |
167 | sdio_enable_func(func); | 167 | sdio_enable_func(func); |
168 | sdio_release_host(func); | 168 | sdio_release_host(func); |
169 | |||
170 | return 0; | ||
169 | } | 171 | } |
170 | 172 | ||
171 | static void wl1271_sdio_power_off(struct wl1271 *wl) | 173 | static int wl1271_sdio_power_off(struct wl1271 *wl) |
172 | { | 174 | { |
173 | struct sdio_func *func = wl_to_func(wl); | 175 | struct sdio_func *func = wl_to_func(wl); |
174 | 176 | ||
175 | sdio_claim_host(func); | 177 | sdio_claim_host(func); |
176 | sdio_disable_func(func); | 178 | sdio_disable_func(func); |
177 | sdio_release_host(func); | 179 | sdio_release_host(func); |
180 | |||
181 | return 0; | ||
178 | } | 182 | } |
179 | 183 | ||
180 | static void wl1271_sdio_set_power(struct wl1271 *wl, bool enable) | 184 | static int wl1271_sdio_set_power(struct wl1271 *wl, bool enable) |
181 | { | 185 | { |
182 | /* Let the SDIO stack handle wlan_enable control, so we | 186 | /* Let the SDIO stack handle wlan_enable control, so we |
183 | * keep host claimed while wlan is in use to keep wl1271 | 187 | * keep host claimed while wlan is in use to keep wl1271 |
184 | * alive. | 188 | * alive. |
185 | */ | 189 | */ |
186 | if (enable) | 190 | if (enable) |
187 | wl1271_sdio_power_on(wl); | 191 | return wl1271_sdio_power_on(wl); |
188 | else | 192 | else |
189 | wl1271_sdio_power_off(wl); | 193 | return wl1271_sdio_power_off(wl); |
190 | |||
191 | } | 194 | } |
192 | 195 | ||
193 | static struct wl1271_if_operations sdio_ops = { | 196 | static struct wl1271_if_operations sdio_ops = { |