From: Grazvydas Ignotas Date: Thu, 23 May 2013 22:17:23 +0000 (+0300) Subject: ath9k_htc: init led work before registering it X-Git-Tag: sz_155~16 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=1926b61a4a78b666bdc4f8277835dca837b1172f ath9k_htc: init led work before registering it this tree has a patch that sets initial LED state on register, so work has to be ready. --- diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c index e3a02eb8e0cc..e64b88fd4912 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c @@ -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;