diff options
author | Mathias Kresin <dev@kresin.me> | 2017-03-21 23:21:57 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2017-04-08 14:30:00 +0200 |
commit | 192f0a3db8598fc6faa47788d0152bda54c5109a (patch) | |
tree | d77563c30e5f2dd5158c9db515ffcc0dcaab529b /package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch | |
parent | af9afa2811f0cfb373071b27a03affd77f9e00eb (diff) | |
download | upstream-192f0a3db8598fc6faa47788d0152bda54c5109a.tar.gz upstream-192f0a3db8598fc6faa47788d0152bda54c5109a.tar.bz2 upstream-192f0a3db8598fc6faa47788d0152bda54c5109a.zip |
ath9k: unset the default LED pin if used by platform leds
Unset the default LED gpio pin if the same gpio pin is used by a LED
defined via platform LED. This prevents that the default led trigger
gets assigned to this LED and the GPIO value gets changed on
wifi up/down in case the led is not used for signaling the wifi state.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch')
-rw-r--r-- | package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch b/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch index d4269282d9..4e28abbc35 100644 --- a/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch +++ b/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch @@ -221,12 +221,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> + ath9k_register_gpio_chip(sc); + - if (pdata && pdata->led_name) - strncpy(led_name, pdata->led_name, sizeof(led_name)); - else -@@ -178,6 +314,7 @@ void ath_init_leds(struct ath_softc *sc) - for (i = 0; i < pdata->num_leds; i++) - ath_create_platform_led(sc, &pdata->leds[i]); + if (pdata && pdata->leds && pdata->num_leds) + for (i = 0; i < pdata->num_leds; i++) { + if (pdata->leds[i].gpio == sc->sc_ah->led_pin) +@@ -183,6 +319,7 @@ void ath_init_leds(struct ath_softc *sc) + ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, + !sc->sc_ah->config.led_active_high); } + #endif |