From: Vasily Khoruzhick <anarsoul@gmail.com>
To: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>
Cc: Vasily Khoruzhick <anarsoul@gmail.com>
Subject: [PATCH] LEDs: fix check for return value of blink_set callback
Date: Fri, 10 Dec 2010 11:58:53 +0200 [thread overview]
Message-ID: <1291975133-25671-1-git-send-email-anarsoul@gmail.com> (raw)
blink_set callback should return 0 on success, but check in
led-class.c is invalid. It results in software fallback even if
hw support is available.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
drivers/leds/led-class.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 211e21f..d5a4ade 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 */
--
1.7.3.2
next reply other threads:[~2010-12-10 10:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-10 9:58 Vasily Khoruzhick [this message]
2010-12-10 14:43 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291975133-25671-1-git-send-email-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome