mac80211: refresh patches
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / ath / 530-ath9k_extra_leds.patch
index 1f19483..30b6bdc 100644 (file)
 +                    GFP_KERNEL);
 +      if (!led)
 +              return -ENOMEM;
-+
+-      ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
 +      led->gpio = gpio = (struct gpio_led *) (led + 1);
 +      _name = (char *) (led->gpio + 1);
 +
 +      ret = ath_add_led(sc, led);
 +      if (unlikely(ret < 0))
 +              kfree(led);
--      ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
++
 +      return ret;
  }
  
  {
 -      if (!sc->led_registered)
 -              return;
-+      struct ath_led *led;
+-
 -      ath_led_brightness(&sc->led_cdev, LED_OFF);
 -      led_classdev_unregister(&sc->led_cdev);
--
++      struct ath_led *led;
 -      ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin);
 +      while (!list_empty(&sc->leds)) {
 +              led = list_first_entry(&sc->leds, struct ath_led, list);