public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] regulator: tps65023: Remove num_voltages array
@ 2011-08-02  9:38 Axel Lin
  2011-08-10 23:16 ` Axel Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2011-08-02  9:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Anuj Aggarwal, Liam Girdwood, Mark Brown

We can get n_voltages for each regulator from table_len of struct tps_info.

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

diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 701a590..3d2a81a 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -106,10 +106,6 @@ static const u16 LDO2_VSEL_table[] = {
 	2500, 2800, 3000, 3300,
 };
 
-static unsigned int num_voltages[] = {ARRAY_SIZE(VDCDC1_VSEL_table),
-				0, 0, ARRAY_SIZE(LDO1_VSEL_table),
-				ARRAY_SIZE(LDO2_VSEL_table)};
-
 /* Regulator specific details */
 struct tps_info {
 	const char *name;
@@ -453,7 +449,7 @@ static int __devinit tps_65023_probe(struct i2c_client *client,
 
 		tps->desc[i].name = info->name;
 		tps->desc[i].id = i;
-		tps->desc[i].n_voltages = num_voltages[i];
+		tps->desc[i].n_voltages = info->table_len;
 		tps->desc[i].ops = (i > TPS65023_DCDC_3 ?
 					&tps65023_ldo_ops : &tps65023_dcdc_ops);
 		tps->desc[i].type = REGULATOR_VOLTAGE;
-- 
1.7.4.1




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

* Re: [PATCH v2] regulator: tps65023: Remove num_voltages array
  2011-08-02  9:38 [PATCH v2] regulator: tps65023: Remove num_voltages array Axel Lin
@ 2011-08-10 23:16 ` Axel Lin
  2011-08-28 16:48   ` Liam Girdwood
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2011-08-10 23:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Anuj Aggarwal, Liam Girdwood, Mark Brown

2011/8/2 Axel Lin <axel.lin@gmail.com>:
> We can get n_voltages for each regulator from table_len of struct tps_info.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---

hi Liam,
Seems this one is also missing.

Regards,
Axel

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

* Re: [PATCH v2] regulator: tps65023: Remove num_voltages array
  2011-08-10 23:16 ` Axel Lin
@ 2011-08-28 16:48   ` Liam Girdwood
  0 siblings, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-08-28 16:48 UTC (permalink / raw)
  To: axel.lin; +Cc: linux-kernel, Anuj Aggarwal, Liam Girdwood, Mark Brown

Hi Axel,

On Thu, 2011-08-11 at 07:16 +0800, Axel Lin wrote:
> 2011/8/2 Axel Lin <axel.lin@gmail.com>:
> > We can get n_voltages for each regulator from table_len of struct tps_info.
> >
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
> > ---
> 
> hi Liam,
> Seems this one is also missing.
> 

I'm just back online from a two week broadband outage and working
through backlog now. Any chance you could resend these 3 with Acks.

Thanks

Liam 


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

end of thread, other threads:[~2011-08-28 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-02  9:38 [PATCH v2] regulator: tps65023: Remove num_voltages array Axel Lin
2011-08-10 23:16 ` Axel Lin
2011-08-28 16:48   ` Liam Girdwood

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