Skip to content

Commit

Permalink
led_class: fix typo in blink API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and Linus Torvalds committed Dec 23, 2010
1 parent 5a2d6e3 commit 91facc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/led-class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 91facc2

Please sign in to comment.