net: ath9k: use devm for gpio_request_one
PATCH 1/1 net: ath9k: use devm for gpio_request_one
No need to manually free the gpio now.
Remove if statement as it's redundant now. The gpio bit now gets cleared whether set or not.
--- drivers/net/wireless/ath/ath9k/hw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/wireless/ath/ath9k/hw.c +2 -5
@@ -2732,7 +2732,7 @@ static void ath9k_hw_gpio_cfg_soc(struct ath_hw *ah, u32 gpio, bool out,if (ah->caps.gpio_requested &BIT (gpio))return ; - err =gpio_request_one (gpio, out ?GPIOF_OUT_INIT_LOW :GPIOF_IN , label); + err =devm_gpio_request_one (ah->dev, gpio, out ?GPIOF_OUT_INIT_LOW :GPIOF_IN , label);if (err) {ath_err (ath9k_hw_common (ah),"request GPIO%d failed:%d\n" , gpio, err);
@@ -2801,10 +2801,7 @@ void ath9k_hw_gpio_free(struct ath_hw *ah, u32 gpio)WARN_ON (gpio >= ah->caps.num_gpio_pins); -if (ah->caps.gpio_requested &BIT (gpio)) { -gpio_free (gpio); - ah->caps.gpio_requested &= ~BIT (gpio); - } + ah->caps.gpio_requested &= ~BIT (gpio); }EXPORT_SYMBOL (ath9k_hw_gpio_free);
Signature · 1 line
2.45.2
Quoted 6 lines · Rosen Penev
No need to manually free the gpio now.
Remove if statement as it's redundant now. The gpio bit now gets cleared whether set or not.
Signed-off-by Rosen Penev <[email protected]>
So presumably these will conflict with this patch?
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
-Toke
Quoted 5 lines · Toke Høiland-Jørgensen
Quoted 2 lines · Rosen Penev
No need to manually free the gpio now.
Quoted 8 lines
Quoted 4 lines
Remove if statement as it's redundant now. The gpio bit now gets cleared whether set or not.
Signed-off-by Rosen Penev <[email protected]>So presumably these will conflict with this patch?
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
This does not look related.
Quoted 2 lines
-Toke
Quoted 9 lines · Rosen Penev
Quoted 8 lines · Toke Høiland-Jørgensen
Quoted 5 lines · Rosen Penev
No need to manually free the gpio now.
Remove if statement as it's redundant now. The gpio bit now gets cleared whether set or not.
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Rosen Penev <[email protected]>So presumably these will conflict with this patch?
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
This does not look related.
Ah, no, you're right; was confusing the PCI-internal device managed thing with the generic one :)
-Toke