summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/wl1271_debugfs.c
diff options
context:
space:
mode:
authorTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>2010-03-18 10:26:27 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2010-03-23 20:50:18 (GMT)
commitbecd551cac0d6868819083c59fc32d1072ba1804 (patch)
treef99edc958ed4ca4553d6c3d7fb8d80ea7f572398 /drivers/net/wireless/wl12xx/wl1271_debugfs.c
parentb43316dbf9c6b01f3ac6dc23bcb94ae66eb3a721 (diff)
downloadlinux-fsl-qoriq-becd551cac0d6868819083c59fc32d1072ba1804.tar.xz
wl1271: Cleaned up wlan power on/off functions
Added method for wlan power control to io_ops struct and moved wl1271_power_on and wl1271_power_off functions to wl1271_io.h. Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_debugfs.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_debugfs.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_debugfs.c b/drivers/net/wireless/wl12xx/wl1271_debugfs.c
index 8d7588c..3c0f5b1 100644
--- a/drivers/net/wireless/wl12xx/wl1271_debugfs.c
+++ b/drivers/net/wireless/wl12xx/wl1271_debugfs.c
@@ -28,6 +28,7 @@
#include "wl1271.h"
#include "wl1271_acx.h"
#include "wl1271_ps.h"
+#include "wl1271_io.h"
/* ms */
#define WL1271_DEBUGFS_STATS_LIFETIME 1000
@@ -276,13 +277,10 @@ static ssize_t gpio_power_write(struct file *file,
goto out;
}
- if (value) {
- wl->set_power(true);
- set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
- } else {
- wl->set_power(false);
- clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
- }
+ if (value)
+ wl1271_power_on(wl);
+ else
+ wl1271_power_off(wl);
out:
mutex_unlock(&wl->mutex);