* [PATCH 3/4] ar9170: fix LED power state handling
@ 2009-05-23 18:30 Christian Lamparter
0 siblings, 0 replies; only message in thread
From: Christian Lamparter @ 2009-05-23 18:30 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
This patch fixes a minor visual bug in the led code, which
left the LED in the wrong power state when it was toggled
in a _unexpected_ way (e.g: enabling the LED twice).
Signed-off-by: Christian Lamparter <chunkeey@web.de>
---
diff --git a/drivers/net/wireless/ath/ar9170/led.c b/drivers/net/wireless/ath/ar9170/led.c
index 341cead..ebb1c3e 100644
--- a/drivers/net/wireless/ath/ar9170/led.c
+++ b/drivers/net/wireless/ath/ar9170/led.c
@@ -81,10 +81,10 @@ static void ar9170_update_leds(struct work_struct *work)
if (tmp < blink_delay)
blink_delay = tmp;
- if (ar->leds[i].toggled > 1)
- ar->leds[i].toggled = 0;
+ if (ar->leds[i].l.brightness == LED_OFF)
+ rerun = true;
- rerun = true;
+ ar->leds[i].toggled = !!ar->leds[i].l.brightness;
}
ar9170_set_leds_state(ar, led_val);
@@ -103,7 +103,7 @@ static void ar9170_led_brightness_set(struct led_classdev *led,
arl->toggled++;
- if (likely(IS_ACCEPTING_CMD(ar) && brightness))
+ if (likely(IS_ACCEPTING_CMD(ar)))
queue_delayed_work(ar->hw->workqueue, &ar->led_work, HZ/10);
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-23 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23 18:30 [PATCH 3/4] ar9170: fix LED power state handling Christian Lamparter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).