Messages in this thread | | | Date | Tue, 9 Oct 2012 15:22:34 +0900 | From | Mark Brown <> | Subject | Re: [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.
| |