1 --- a/include/linux/ath9k_platform.h
2 +++ b/include/linux/ath9k_platform.h
3 @@ -46,6 +46,9 @@ struct ath9k_platform_data {
4 int (*external_reset)(void);
9 + const struct gpio_led *leds;
12 #endif /* _LINUX_ATH9K_PLATFORM_H */
13 --- a/drivers/net/wireless/ath/ath9k/gpio.c
14 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
19 +#include <linux/ath9k_platform.h>
21 /********************************/
23 @@ -108,6 +109,24 @@ int ath_create_gpio_led(struct ath_softc
27 +static int ath_create_platform_led(struct ath_softc *sc,
28 + const struct gpio_led *gpio)
30 + struct ath_led *led;
33 + led = kzalloc(sizeof(*led), GFP_KERNEL);
38 + ret = ath_add_led(sc, led);
45 void ath_deinit_leds(struct ath_softc *sc)
48 @@ -124,8 +143,10 @@ void ath_deinit_leds(struct ath_softc *s
50 void ath_init_leds(struct ath_softc *sc)
52 + struct ath9k_platform_data *pdata = sc->dev->platform_data;
57 INIT_LIST_HEAD(&sc->leds);
59 @@ -144,6 +165,12 @@ void ath_init_leds(struct ath_softc *sc)
61 ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger,
62 !sc->sc_ah->config.led_active_high);
67 + for (i = 0; i < pdata->num_leds; i++)
68 + ath_create_platform_led(sc, &pdata->leds[i]);