From 91facc22dec964683aef88f5620a790a6e46b98a Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 21 Dec 2010 17:24:28 -0800 Subject: 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 Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/leds/led-class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/leds') 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 */ -- cgit v1.2.1