ath9k_htc: init led work before registering it
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 23 May 2013 22:17:23 +0000 (01:17 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Thu, 23 May 2013 22:17:23 +0000 (01:17 +0300)
this tree has a patch that sets initial LED state on register,
so work has to be ready.

drivers/net/wireless/ath/ath9k/htc_drv_gpio.c

index e3a02eb..e64b88f 100644 (file)
@@ -211,11 +211,12 @@ void ath9k_init_leds(struct ath9k_htc_priv *priv)
        priv->led_cdev.name = priv->led_name;
        priv->led_cdev.brightness_set = ath9k_led_brightness;
 
+       INIT_WORK(&priv->led_work, ath9k_led_work);
+
        ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &priv->led_cdev);
        if (ret < 0)
                return;
 
-       INIT_WORK(&priv->led_work, ath9k_led_work);
        priv->led_registered = true;
 
        return;