summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-12-22 02:24:28 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-12-23 04:43:34 +0100
commit91facc22dec964683aef88f5620a790a6e46b98a (patch)
tree0bd60c77f6efc174ae99209b4e8b008d241d53ac
parentbacklight: cr_bllcd.c: fix a memory leak (diff)
downloadlinux-91facc22dec964683aef88f5620a790a6e46b98a.tar.xz
linux-91facc22dec964683aef88f5620a790a6e46b98a.zip
led_class: fix typo in blink API
When I added led_blink_set I had a typo: the return value of the hw offload is a regular error code that is zero when succesful, and in that case software emulation should not be used, rather than the other way around. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Cc: Richard Purdie <rpurdie@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/leds/led-class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 211e21f34bd5..d5a4ade88991 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -267,7 +267,7 @@ void led_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_off)
{
if (led_cdev->blink_set &&
- led_cdev->blink_set(led_cdev, delay_on, delay_off))
+ !led_cdev->blink_set(led_cdev, delay_on, delay_off))
return;
/* blink with 1 Hz as default if nothing specified */