All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Jonathan Cameron <kernel@jic23.retrosnub.co.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	giometti@linux.it
Subject: Re: [PATCH 2/2] als: tsl2550: Remove spurious check against a maximum  lux value.
Date: Wed, 27 Jan 2010 17:25:46 +0100	[thread overview]
Message-ID: <20100127172546.42e09e1f@hyperion.delvare> (raw)
In-Reply-To: <4B60535F.5020400@cam.ac.uk>

On Wed, 27 Jan 2010 14:53:19 +0000, Jonathan Cameron wrote:
> 
> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>

Acked-by: Jean Delvare <khali@linux-fr.org>

> ---
> 
> As Jean Delvare observed, this check is ineffective so lets clear it out whilst
> we are working on this driver.
> 
>  drivers/als/tsl2550.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/als/tsl2550.c b/drivers/als/tsl2550.c
> index b911e9c..27745a5 100644
> --- a/drivers/als/tsl2550.c
> +++ b/drivers/als/tsl2550.c
> @@ -116,8 +116,6 @@ static int tsl2550_get_adc_value(struct i2c_client *client, u8 cmd)
>   * of infrared level and visible light levels.
>   */
>  
> -#define	TSL2550_MAX_LUX		1846
> -
>  static const u8 ratio_lut[] = {
>  	100, 100, 100, 100, 100, 100, 100, 100,
>  	100, 100, 100, 100, 100, 100, 99, 99,
> @@ -187,8 +185,7 @@ static int tsl2550_calculate_lux(u8 ch0, u8 ch1)
>  	else
>  		return -EAGAIN;
>  
> -	/* LUX range check */
> -	return lux > TSL2550_MAX_LUX ? TSL2550_MAX_LUX : lux;
> +	return lux;
>  }
>  
>  /*


-- 
Jean Delvare

      reply	other threads:[~2010-01-27 16:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-12 17:17 [PATCH] tsl2550: Move form i2c/chips to als and update interfaces Jonathan Cameron
2010-01-26  9:51 ` Jean Delvare
2010-01-26 18:46   ` [PATCH V2] " Jonathan Cameron
2010-01-26 18:50     ` Jonathan Cameron
2010-01-26 18:57       ` [PATCH V3] " Jonathan Cameron
2010-01-27 13:36         ` Jean Delvare
2010-01-27 14:38           ` Jonathan Cameron
2010-01-27 14:50             ` [PATCH 1/2] " Jonathan Cameron
2010-01-27 14:53               ` [PATCH 2/2] als: tsl2550: Remove spurious check against a maximum lux value Jonathan Cameron
2010-01-27 16:25                 ` Jean Delvare [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=20100127172546.42e09e1f@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=giometti@linux.it \
    --cc=jic23@cam.ac.uk \
    --cc=kernel@jic23.retrosnub.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rui.zhang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.