public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2 v2] regulator: max8952 - fix max8952_set_voltage
@ 2010-10-25 23:55 Axel Lin
  2010-10-26  1:19 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2010-10-25 23:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, MyungJoo Ham, Kyungmin Park

In current implementation, vid is declared as u8,
then "vid == -1" is always false, and "vid >= 0" is always true.
Thus change it to s8.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/max8952.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index f2af0b1..d5cc051 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -136,7 +136,7 @@ static int max8952_set_voltage(struct regulator_dev *rdev,
 				int min_uV, int max_uV)
 {
 	struct max8952_data *max8952 = rdev_get_drvdata(rdev);
-	u8 vid = -1, i;
+	s8 vid = -1, i;
 
 	if (!gpio_is_valid(max8952->pdata->gpio_vid0) ||
 			!gpio_is_valid(max8952->pdata->gpio_vid0)) {
-- 
1.7.0.4




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

* Re: [PATCH 2/2 v2] regulator: max8952 - fix max8952_set_voltage
  2010-10-25 23:55 [PATCH 2/2 v2] regulator: max8952 - fix max8952_set_voltage Axel Lin
@ 2010-10-26  1:19 ` Mark Brown
  2010-10-26  1:38   ` Kyungmin Park
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2010-10-26  1:19 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Liam Girdwood, MyungJoo Ham, Kyungmin Park

On Tue, Oct 26, 2010 at 07:55:54AM +0800, Axel Lin wrote:
> In current implementation, vid is declared as u8,
> then "vid == -1" is always false, and "vid >= 0" is always true.
> Thus change it to s8.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

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

* Re: [PATCH 2/2 v2] regulator: max8952 - fix max8952_set_voltage
  2010-10-26  1:19 ` Mark Brown
@ 2010-10-26  1:38   ` Kyungmin Park
  2010-10-26 11:23     ` Liam Girdwood
  0 siblings, 1 reply; 4+ messages in thread
From: Kyungmin Park @ 2010-10-26  1:38 UTC (permalink / raw)
  To: Mark Brown; +Cc: Axel Lin, linux-kernel, Liam Girdwood, MyungJoo Ham

Hi Axel,

Thank you for your works.

Acked-by: Kyungmin Park <kyungmin.park@samsung.com>

On Tue, Oct 26, 2010 at 10:19 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Oct 26, 2010 at 07:55:54AM +0800, Axel Lin wrote:
>> In current implementation, vid is declared as u8,
>> then "vid == -1" is always false, and "vid >= 0" is always true.
>> Thus change it to s8.
>>
>> Signed-off-by: Axel Lin <axel.lin@gmail.com>
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> --
> 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

* Re: [PATCH 2/2 v2] regulator: max8952 - fix max8952_set_voltage
  2010-10-26  1:38   ` Kyungmin Park
@ 2010-10-26 11:23     ` Liam Girdwood
  0 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2010-10-26 11:23 UTC (permalink / raw)
  To: Kyungmin Park; +Cc: Mark Brown, Axel Lin, linux-kernel, MyungJoo Ham

On Tue, 2010-10-26 at 10:38 +0900, Kyungmin Park wrote:
> Hi Axel,
> 
> Thank you for your works.
> 
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> 
> On Tue, Oct 26, 2010 at 10:19 AM, Mark Brown
> <broonie@opensource.wolfsonmicro.com> wrote:
> > On Tue, Oct 26, 2010 at 07:55:54AM +0800, Axel Lin wrote:
> >> In current implementation, vid is declared as u8,
> >> then "vid == -1" is always false, and "vid >= 0" is always true.
> >> Thus change it to s8.
> >>
> >> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> >
> > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > --

Both applied.

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk


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

end of thread, other threads:[~2010-10-26 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 23:55 [PATCH 2/2 v2] regulator: max8952 - fix max8952_set_voltage Axel Lin
2010-10-26  1:19 ` Mark Brown
2010-10-26  1:38   ` Kyungmin Park
2010-10-26 11:23     ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox