Lines Matching defs:led
840 struct ath_led *led = container_of(work, struct ath_led,
842 struct ath9k_htc_priv *priv = led->priv;
844 switch (led->brightness) {
846 if (led->led_type == ATH_LED_ASSOC ||
847 led->led_type == ATH_LED_RADIO) {
849 (led->led_type == ATH_LED_RADIO));
851 if (led->led_type == ATH_LED_RADIO)
858 if (led->led_type == ATH_LED_ASSOC) {
862 } else if (led->led_type == ATH_LED_RADIO) {
877 struct ath_led *led = container_of(led_cdev, struct ath_led, led_cdev);
878 struct ath9k_htc_priv *priv = led->priv;
880 led->brightness = brightness;
883 &led->brightness_work, 0);
894 static int ath9k_register_led(struct ath9k_htc_priv *priv, struct ath_led *led,
899 led->priv = priv;
900 led->led_cdev.name = led->name;
901 led->led_cdev.default_trigger = trigger;
902 led->led_cdev.brightness_set = ath9k_led_brightness;
904 ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_cdev);
907 "Failed to register led:%s", led->name);
909 led->registered = 1;
911 INIT_DELAYED_WORK(&led->brightness_work, ath9k_led_brightness_work);
916 static void ath9k_unregister_led(struct ath_led *led)
918 if (led->registered) {
919 led_classdev_unregister(&led->led_cdev);
920 led->registered = 0;