>From 58eb478ced706dda18af23452c26568ea25aac77 Mon Sep 17 00:00:00 2001 From: Gary Thomas Date: Tue, 1 May 2012 06:02:11 -0600 Subject: [PATCH 1/3] Use platform specific power function if provided when taking interface up/down Signed-off-by: Gary Thomas --- drivers/net/wireless/wl12xx/sdio.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index 536e506..a242b67 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c @@ -170,6 +170,11 @@ static int wl1271_sdio_power_on(struct wl1271 *wl) struct sdio_func *func = wl_to_func(wl); int ret; + /* Use platform function to enable power if provided */ + if (wl->set_power) { + (wl->set_power)(true); + } + /* Make sure the card will not be powered off by runtime PM */ ret = pm_runtime_get_sync(&func->dev); if (ret < 0) @@ -200,6 +205,11 @@ static int wl1271_sdio_power_off(struct wl1271 *wl) if (ret < 0) return ret; + /* Use platform function to disable power if provided */ + if (wl->set_power) { + (wl->set_power)(false); + } + /* Let runtime PM know the card is powered off */ return pm_runtime_put_sync(&func->dev); } @@ -264,6 +274,7 @@ static int __devinit wl1271_probe(struct sdio_func *func, wl->ref_clock = wlan_data->board_ref_clock; wl->tcxo_clock = wlan_data->board_tcxo_clock; wl->platform_quirks = wlan_data->platform_quirks; + wl->set_power = wlan_data->set_power; if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) irqflags = IRQF_TRIGGER_RISING; -- 1.7.7.6