2010-08-22 07:26:29

by Axel Lin

[permalink] [raw]
Subject: [PATCH] regulator: max8998 - set max8998->num_regulators

Set max8998->num_regulators = pdata->num_regulators,
otherwise it's default value is 0.

Signed-off-by: Axel Lin <[email protected]>
---
drivers/regulator/max8998.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index ab67298..f0d8261 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -558,6 +558,7 @@ static __devinit int max8998_pmic_probe(struct platform_device *pdev)

rdev = max8998->rdev;
max8998->iodev = iodev;
+ max8998->num_regulators = pdata->num_regulators;
platform_set_drvdata(pdev, max8998);

for (i = 0; i < pdata->num_regulators; i++) {
--
1.7.0.4



2010-08-23 10:01:34

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] regulator: max8998 - set max8998->num_regulators

On Sun, Aug 22, 2010 at 03:26:49PM +0800, Axel Lin wrote:
> Set max8998->num_regulators = pdata->num_regulators,
> otherwise it's default value is 0.
>
> Signed-off-by: Axel Lin <[email protected]>

Acked-by: Mark Brown <[email protected]>

With a change like this it's good to note why things worked prior to the
change - my first thought was that it might be better to loose the
driver data copy entirely if we were fine with it being set to zero.

2010-08-24 14:01:33

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH] regulator: max8998 - set max8998->num_regulators

On Mon, 2010-08-23 at 11:01 +0100, Mark Brown wrote:
> On Sun, Aug 22, 2010 at 03:26:49PM +0800, Axel Lin wrote:
> > Set max8998->num_regulators = pdata->num_regulators,
> > otherwise it's default value is 0.
> >
> > Signed-off-by: Axel Lin <[email protected]>
>
> Acked-by: Mark Brown <[email protected]>

Applied.

Thanks

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