#ifdef CPTCFG_ATH9K_DEBUGFS
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
-@@ -16,12 +16,120 @@
+@@ -16,12 +16,122 @@
#include "ath9k.h"
+/* register GPIO chip */
+static void ath9k_register_gpio_chip(struct ath_softc *sc)
+{
-+ struct gpio_chip *gc = sc->gpiochip;
++ struct gpio_chip *gc;
+ struct ath_hw *ah = sc->sc_ah;
+
+ gc = kzalloc(sizeof(struct gpio_chip), GFP_KERNEL);
+ kfree(gc);
+ return;
+ }
++
++ sc->gpiochip = gc;
+}
+
+/* remove GPIO chip */
static void ath_fill_led_pin(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
-@@ -79,6 +187,12 @@ static int ath_add_led(struct ath_softc
+@@ -79,6 +189,12 @@ static int ath_add_led(struct ath_softc
else
ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low);
return 0;
}
-@@ -117,16 +231,23 @@ void ath_deinit_leds(struct ath_softc *s
+@@ -117,16 +233,23 @@ void ath_deinit_leds(struct ath_softc *s
while (!list_empty(&sc->leds)) {
led = list_first_entry(&sc->leds, struct ath_led, list);
char led_name[32];
const char *trigger;
-@@ -135,6 +256,15 @@ void ath_init_leds(struct ath_softc *sc)
+@@ -135,6 +258,15 @@ void ath_init_leds(struct ath_softc *sc)
if (AR_SREV_9100(sc->sc_ah))
return;