diff options
author | Bob Copeland <me@bobcopeland.com> | 2009-06-09 23:43:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-10 13:28:39 -0400 |
commit | a6ae0716e5c3b5f9dbe5ed8f473a6c7b89692365 (patch) | |
tree | 03cb4056959ccf538b26f565c1e4509e4e0a5250 /drivers/net/wireless/ath/ath5k/rfkill.c | |
parent | 27004b10ce56985d8a010ce966af179f1b34193f (diff) |
ath5k: minor rfkill cleanup
Always enable rfkill since the ifdefs in the code is not really worth
the Kconfig option. Also fix a few code style things, and remove the
usage of the ah_gpio[] array so we can remove it later.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/rfkill.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/rfkill.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath5k/rfkill.c b/drivers/net/wireless/ath/ath5k/rfkill.c index 492ada92db5..41a877b73fc 100644 --- a/drivers/net/wireless/ath/ath5k/rfkill.c +++ b/drivers/net/wireless/ath/ath5k/rfkill.c @@ -56,10 +56,12 @@ static inline void ath5k_rfkill_enable(struct ath5k_softc *sc) static inline void ath5k_rfkill_set_intr(struct ath5k_softc *sc, bool enable) { struct ath5k_hw *ah = sc->ah; + u32 curval; + ath5k_hw_set_gpio_input(ah, sc->rf_kill.gpio); - ah->ah_gpio[0] = ath5k_hw_get_gpio(ah, sc->rf_kill.gpio); + curval = ath5k_hw_get_gpio(ah, sc->rf_kill.gpio); ath5k_hw_set_gpio_intr(ah, sc->rf_kill.gpio, enable ? - !!ah->ah_gpio[0] : !ah->ah_gpio[0]); + !!curval : !curval); } static bool @@ -97,9 +99,8 @@ ath5k_rfkill_hw_start(struct ath5k_hw *ah) ath5k_rfkill_disable(sc); /* enable interrupt for rfkill switch */ - if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) { + if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) ath5k_rfkill_set_intr(sc, true); - } } @@ -109,9 +110,8 @@ ath5k_rfkill_hw_stop(struct ath5k_hw *ah) struct ath5k_softc *sc = ah->ah_sc; /* disable interrupt for rfkill switch */ - if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) { + if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) ath5k_rfkill_set_intr(sc, false); - } tasklet_kill(&sc->rf_kill.toggleq); |