Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150674
b: refs/heads/master
c: 2431fe9
h: refs/heads/master
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Jun 3, 2009
1 parent c81f051 commit 8782ba7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95cf8769bba6ea595994f786ea63f7e2948133de
refs/heads/master: 2431fe9a4b43ccf03589fa661662da6bfbd97282
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ar9170/ar9170.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ struct ar9170_led {
struct led_classdev l;
char name[32];
unsigned int toggled;
bool last_state;
bool registered;
};

Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/net/wireless/ath/ar9170/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,12 @@ static void ar9170_led_brightness_set(struct led_classdev *led,
struct ar9170_led *arl = container_of(led, struct ar9170_led, l);
struct ar9170 *ar = arl->ar;

arl->toggled++;
if (arl->last_state != !!brightness) {
arl->toggled++;
arl->last_state = !!brightness;
}

if (likely(IS_ACCEPTING_CMD(ar) && brightness))
if (likely(IS_ACCEPTING_CMD(ar) && arl->toggled))
queue_delayed_work(ar->hw->workqueue, &ar->led_work, HZ/10);
}

Expand Down

0 comments on commit 8782ba7

Please sign in to comment.