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>
This commit is contained in:
parent
5a2d6e31c6
commit
91facc22de
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue