Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266346
b: refs/heads/master
c: d3b104a
h: refs/heads/master
v: v3
  • Loading branch information
Shahar Levi authored and Luciano Coelho committed Sep 23, 2011
1 parent b6d6d54 commit 79a1a4d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cd9d21a0c1e2648c07c32c66bb25795ad3208aa
refs/heads/master: d3b104ae22a761dbec8410e6e66ac048c9ff9b5f
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
wl12xx-objs = main.o cmd.o io.o event.o tx.o rx.o ps.o acx.o \
boot.o init.o debugfs.o scan.o

wl12xx_spi-objs = spi.o
wl12xx_spi-objs = spi.o
wl12xx_sdio-objs = sdio.o
wl12xx_sdio_test-objs = sdio_test.o
wl12xx_sdio_test-objs = sdio_test.o

wl12xx-$(CONFIG_NL80211_TESTMODE) += testmode.o
obj-$(CONFIG_WL12XX) += wl12xx.o
obj-$(CONFIG_WL12XX_SPI) += wl12xx_spi.o
obj-$(CONFIG_WL12XX_SDIO) += wl12xx_sdio.o

obj-$(CONFIG_WL12XX_SDIO_TEST) += wl12xx_sdio_test.o
obj-$(CONFIG_WL12XX_SDIO_TEST) += wl12xx_sdio_test.o

# small builtin driver bit
obj-$(CONFIG_WL12XX_PLATFORM_DATA) += wl12xx_platform_data.o
15 changes: 12 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/sdio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
#include <linux/gpio.h>
#include <linux/wl12xx.h>
#include <linux/kthread.h>
Expand Down Expand Up @@ -142,14 +143,23 @@ static int wl1271_sdio_set_power(struct wl1271 *wl, bool enable)
ret = pm_runtime_get_sync(&func->dev);
if (ret < 0)
goto out;

/* Runtime PM might be disabled, power up the card manually */
ret = mmc_power_restore_host(func->card->host);
if (ret < 0)
goto out;

sdio_claim_host(func);
sdio_enable_func(func);
sdio_release_host(func);
} else {
sdio_claim_host(func);
sdio_disable_func(func);
sdio_release_host(func);

/* Runtime PM might be disabled, power off the card manually */
ret = mmc_power_save_host(func->card->host);
if (ret < 0)
goto out;

/* Power down the card */
ret = pm_runtime_put_sync(&func->dev);
}
Expand Down Expand Up @@ -433,7 +443,6 @@ static int __devinit wl1271_probe(struct sdio_func *func,

sdio_set_drvdata(func, wl_test);


/* power up the device */
ret = wl1271_chip_wakeup(wl);
if (ret) {
Expand Down

0 comments on commit 79a1a4d

Please sign in to comment.