* [PATCH] regulator: lp8755: Use LP8755_BUCK_MAX instead of magic number
@ 2013-01-26 5:19 Axel Lin
2013-01-26 17:42 ` daniel jeong
2013-01-27 3:00 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-01-26 5:19 UTC (permalink / raw)
To: Mark Brown; +Cc: Daniel Jeong, Liam Girdwood, linux-kernel
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/lp8755.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c
index 8b1ce0f..f0f6ea0 100644
--- a/drivers/regulator/lp8755.c
+++ b/drivers/regulator/lp8755.c
@@ -373,7 +373,7 @@ static irqreturn_t lp8755_irq_handler(int irq, void *data)
goto err_i2c;
/* sent power fault detection event to specific regulator */
- for (icnt = 0; icnt < 6; icnt++)
+ for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
if ((flag0 & (0x4 << icnt))
&& (pchip->irqmask & (0x04 << icnt))
&& (pchip->rdev[icnt] != NULL))
@@ -508,7 +508,7 @@ err_irq:
err_regulator:
/* output disable */
- for (icnt = 0; icnt < 0x06; icnt++)
+ for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
lp8755_write(pchip, icnt, 0x00);
return ret;
@@ -522,7 +522,7 @@ static int lp8755_remove(struct i2c_client *client)
for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++)
regulator_unregister(pchip->rdev[icnt]);
- for (icnt = 0; icnt < 0x06; icnt++)
+ for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
lp8755_write(pchip, icnt, 0x00);
if (pchip->irq != 0)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: lp8755: Use LP8755_BUCK_MAX instead of magic number
2013-01-26 5:19 [PATCH] regulator: lp8755: Use LP8755_BUCK_MAX instead of magic number Axel Lin
@ 2013-01-26 17:42 ` daniel jeong
2013-01-27 3:00 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: daniel jeong @ 2013-01-26 17:42 UTC (permalink / raw)
To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel
On Jan 26, 2013, at 2:19 PM, Axel Lin <axel.lin@ingics.com> wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/regulator/lp8755.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c
> index 8b1ce0f..f0f6ea0 100644
> --- a/drivers/regulator/lp8755.c
> +++ b/drivers/regulator/lp8755.c
> @@ -373,7 +373,7 @@ static irqreturn_t lp8755_irq_handler(int irq, void *data)
> goto err_i2c;
>
> /* sent power fault detection event to specific regulator */
> - for (icnt = 0; icnt < 6; icnt++)
> + for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
> if ((flag0 & (0x4 << icnt))
> && (pchip->irqmask & (0x04 << icnt))
> && (pchip->rdev[icnt] != NULL))
> @@ -508,7 +508,7 @@ err_irq:
>
> err_regulator:
> /* output disable */
> - for (icnt = 0; icnt < 0x06; icnt++)
> + for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
> lp8755_write(pchip, icnt, 0x00);
>
> return ret;
> @@ -522,7 +522,7 @@ static int lp8755_remove(struct i2c_client *client)
> for (icnt = 0; icnt < mphase_buck[pchip->mphase].nreg; icnt++)
> regulator_unregister(pchip->rdev[icnt]);
>
> - for (icnt = 0; icnt < 0x06; icnt++)
> + for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
> lp8755_write(pchip, icnt, 0x00);
>
> if (pchip->irq != 0)
> --
> 1.7.9.5
>
>
>
Yes you're right!
Thank you Axel.
Daniel.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: lp8755: Use LP8755_BUCK_MAX instead of magic number
2013-01-26 5:19 [PATCH] regulator: lp8755: Use LP8755_BUCK_MAX instead of magic number Axel Lin
2013-01-26 17:42 ` daniel jeong
@ 2013-01-27 3:00 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-01-27 3:00 UTC (permalink / raw)
To: Axel Lin; +Cc: Daniel Jeong, Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
On Sat, Jan 26, 2013 at 01:19:47PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-27 3:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-26 5:19 [PATCH] regulator: lp8755: Use LP8755_BUCK_MAX instead of magic number Axel Lin
2013-01-26 17:42 ` daniel jeong
2013-01-27 3:00 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).