lkml.org 
[lkml]   [2012]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] regulator; tps65090: Register all regulators in single probe call
On Sat, Oct 06, 2012 at 08:47:48PM +0530, Laxman Dewangan wrote:
> MFD drier registers the regulator driver once per device and
> hence it is require to register all regulators in single probe
> call.
> Following are details of changes done to achieve this:
> - Add max regulator and register all regulators even if there
> is no regulator init data from platform.
> - Convert regulator init data to pointer type in platform data.
> - Add input supply name in regulator desc to provide input supply.
> - Separate desc information from driver information.

Shouldn't this be the first commit in the series? Also...

> + for (num = 0; num < TPS65090_REGULATOR_MAX; num++) {
> + tps_pdata = tps65090_pdata->reg_pdata[num];

> struct tps65090_regulator_platform_data {
> - struct regulator_init_data regulator;
> + struct regulator_init_data *reg_init_data;
> };

I can't help but think that if we're going to require the full array
here the array should just be declared immediately - perhaps as an array
of pointers:

struct regulator_init_data *reg_init_data[TPS65090_REGULATOR_MAX];

to allow things to be missed out. Otherwise we're likely to crash if
the user misses a regulator or something.


\
 
 \ /
  Last update: 2012-10-09 11:01    [W:0.202 / U:1.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site