Skip to content

Commit 91851cc

Browse files
neocturnekvalo
authored andcommitted
ath9k: fix ath9k_hw_gpio_get() to return 0 or 1 on success
Commit b2d70d4 ("ath9k: make GPIO API to support both of WMAC and SOC") refactored ath9k_hw_gpio_get() to support both WMAC and SOC GPIOs, changing the return on success from 1 to BIT(gpio). This broke some callers like ath_is_rfkill_set(). This doesn't fix any known bug in mainline at the moment, but should be fixed anyway. Instead of fixing all callers, change ath9k_hw_gpio_get() back to only return 0 or 1. Fixes: b2d70d4 ("ath9k: make GPIO API to support both of WMAC and SOC") Cc: <[email protected]> # v4.7+ Signed-off-by: Matthias Schiffer <[email protected]> [[email protected]: mention that doesn't fix any known bug] Signed-off-by: Kalle Valo <[email protected]>
1 parent 5a401f3 commit 91851cc

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/ath/ath9k

1 file changed

+1
-1
lines changed

drivers/net/wireless/ath/ath9k/hw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2792,7 +2792,7 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah, u32 gpio)
27922792
WARN_ON(1);
27932793
}
27942794

2795-
return val;
2795+
return !!val;
27962796
}
27972797
EXPORT_SYMBOL(ath9k_hw_gpio_get);
27982798

0 commit comments

Comments
 (0)