ath9k: enable GPIO chip only if requested via DT
[openwrt/staging/stintel.git] / package / kernel / mac80211 / patches / 549-ath9k_enable_gpio_buttons.patch
index 8aefcf4d0746e9792ea66a50ae3e4275ae8346f8..1d1efe5384af3d867faa4f2132d4fdc14a0f0ed0 100644 (file)
@@ -117,10 +117,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        while (!list_empty(&sc->leds)) {
                led = list_first_entry(&sc->leds, struct ath_led, list);
  #ifdef CONFIG_GPIOLIB
-@@ -293,6 +362,7 @@ void ath_init_leds(struct ath_softc *sc)
-       ath_fill_led_pin(sc);
+@@ -299,6 +368,7 @@ void ath_init_leds(struct ath_softc *sc)
+               ath9k_register_gpio_chip(sc);
  
-       ath9k_register_gpio_chip(sc);
+       ath_fill_led_pin(sc);
 +      ath9k_init_buttons(sc);
  
        if (pdata && pdata->leds && pdata->num_leds)