public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@linux.intel.com>
To: Vasily Khoruzhick <anarsoul@gmail.com>, akpm <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] LEDs: fix check for return value of blink_set callback
Date: Fri, 10 Dec 2010 14:43:56 +0000	[thread overview]
Message-ID: <1291992236.14420.3.camel@rex> (raw)
In-Reply-To: <1291975133-25671-1-git-send-email-anarsoul@gmail.com>

On Fri, 2010-12-10 at 11:58 +0200, Vasily Khoruzhick wrote:
> 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>

Acked-by: Richard Purdie <rpurdie@linux.intel.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 */



      reply	other threads:[~2010-12-10 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-10  9:58 [PATCH] LEDs: fix check for return value of blink_set callback Vasily Khoruzhick
2010-12-10 14:43 ` Richard Purdie [this message]

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=1291992236.14420.3.camel@rex \
    --to=rpurdie@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=anarsoul@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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