All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ds2782: Fix ds2782_get_capacity return value
@ 2010-06-15  0:44 Ryan Mallon
  2010-06-20 21:35 ` Ryan Mallon
  0 siblings, 1 reply; 4+ messages in thread
From: Ryan Mallon @ 2010-06-15  0:44 UTC (permalink / raw)
  To: cbouatmailru; +Cc: mike, linux-kernel, vilensky, mike.rapoport, Ryan Mallon

The ds2782_get_capacity function should return 0 on success, not the
capacity value.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
---
 drivers/power/ds2782_battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
index d762a0c..2afbeec 100644
--- a/drivers/power/ds2782_battery.c
+++ b/drivers/power/ds2782_battery.c
@@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
 	if (err)
 		return err;
 	*capacity = raw;
-	return raw;
+	return 0;
 }
 
 static int ds2786_get_current(struct ds278x_info *info, int *current_uA)
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ds2782: Fix ds2782_get_capacity return value
  2010-06-15  0:44 [PATCH] ds2782: Fix ds2782_get_capacity return value Ryan Mallon
@ 2010-06-20 21:35 ` Ryan Mallon
  2010-06-21 15:15   ` Anton Vorontsov
  2010-06-22  9:03   ` CoffBeta
  0 siblings, 2 replies; 4+ messages in thread
From: Ryan Mallon @ 2010-06-20 21:35 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: mike, linux-kernel, vilensky, mike.rapoport

On 06/15/2010 12:44 PM, Ryan Mallon wrote:
> The ds2782_get_capacity function should return 0 on success, not the
> capacity value.
> 
> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
> ---
>  drivers/power/ds2782_battery.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
> index d762a0c..2afbeec 100644
> --- a/drivers/power/ds2782_battery.c
> +++ b/drivers/power/ds2782_battery.c
> @@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
>  	if (err)
>  		return err;
>  	*capacity = raw;
> -	return raw;
> +	return 0;
>  }
>  
>  static int ds2786_get_current(struct ds278x_info *info, int *current_uA)

Ping, Anton?

~Ryan

-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan@bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ds2782: Fix ds2782_get_capacity return value
  2010-06-20 21:35 ` Ryan Mallon
@ 2010-06-21 15:15   ` Anton Vorontsov
  2010-06-22  9:03   ` CoffBeta
  1 sibling, 0 replies; 4+ messages in thread
From: Anton Vorontsov @ 2010-06-21 15:15 UTC (permalink / raw)
  To: Ryan Mallon; +Cc: mike, linux-kernel, vilensky, mike.rapoport

On Mon, Jun 21, 2010 at 09:35:09AM +1200, Ryan Mallon wrote:
> On 06/15/2010 12:44 PM, Ryan Mallon wrote:
> > The ds2782_get_capacity function should return 0 on success, not the
> > capacity value.
> > 
> > Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
> > ---
> >  drivers/power/ds2782_battery.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
> > index d762a0c..2afbeec 100644
> > --- a/drivers/power/ds2782_battery.c
> > +++ b/drivers/power/ds2782_battery.c
> > @@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
> >  	if (err)
> >  		return err;
> >  	*capacity = raw;
> > -	return raw;
> > +	return 0;
> >  }
> >  
> >  static int ds2786_get_current(struct ds278x_info *info, int *current_uA)
> 
> Ping, Anton?

Applied to battery-2.6.35.git, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ds2782: Fix ds2782_get_capacity return value
  2010-06-20 21:35 ` Ryan Mallon
  2010-06-21 15:15   ` Anton Vorontsov
@ 2010-06-22  9:03   ` CoffBeta
  1 sibling, 0 replies; 4+ messages in thread
From: CoffBeta @ 2010-06-22  9:03 UTC (permalink / raw)
  To: Ryan Mallon; +Cc: Anton Vorontsov, mike, linux-kernel, vilensky, mike.rapoport

confirm

On Mon, Jun 21, 2010 at 05:35, Ryan Mallon <ryan@bluewatersys.com> wrote:
> On 06/15/2010 12:44 PM, Ryan Mallon wrote:
>> The ds2782_get_capacity function should return 0 on success, not the
>> capacity value.
>>
>> Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
>> ---
>>  drivers/power/ds2782_battery.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
>> index d762a0c..2afbeec 100644
>> --- a/drivers/power/ds2782_battery.c
>> +++ b/drivers/power/ds2782_battery.c
>> @@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
>>       if (err)
>>               return err;
>>       *capacity = raw;
>> -     return raw;
>> +     return 0;
>>  }
>>
>>  static int ds2786_get_current(struct ds278x_info *info, int *current_uA)
>
> Ping, Anton?
>
> ~Ryan
>
> --
> Bluewater Systems Ltd - ARM Technology Solution Centre
>
> Ryan Mallon                     5 Amuri Park, 404 Barbadoes St
> ryan@bluewatersys.com           PO Box 13 889, Christchurch 8013
> http://www.bluewatersys.com     New Zealand
> Phone: +64 3 3779127            Freecall: Australia 1800 148 751
> Fax:   +64 3 3779135                      USA 1800 261 2934
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-22  9:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-15  0:44 [PATCH] ds2782: Fix ds2782_get_capacity return value Ryan Mallon
2010-06-20 21:35 ` Ryan Mallon
2010-06-21 15:15   ` Anton Vorontsov
2010-06-22  9:03   ` CoffBeta

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.