mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Richard Purdie <rpurdie@linux.intel.com>
Subject: [PATCH 2.6.37] led_class: fix typo in blink API
Date: Sat, 27 Nov 2010 19:42:08 +0100	[thread overview]
Message-ID: <1290883328.3700.1.camel@jlt3.sipsolutions.net> (raw)

From: Johannes Berg <johannes.berg@intel.com>

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>
---
It'd be nice to get this into 2.6.37 since the patch
that has the bug is in there. Sorry about that -- I
had tested the software implementation extensively but
apparently never tested the hw offload part.

 drivers/leds/led-class.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/drivers/leds/led-class.c	2010-11-27 19:32:24.000000000 +0100
+++ wireless-testing/drivers/leds/led-class.c	2010-11-27 19:35:41.000000000 +0100
@@ -267,7 +267,7 @@ void led_blink_set(struct led_classdev *
 		   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 */



             reply	other threads:[~2010-11-27 18:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-27 18:42 Johannes Berg [this message]
2010-12-18 17:20 ` Johannes Berg

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=1290883328.3700.1.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@linux.intel.com \
    /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