[PATCH] mfd: convert devicetree to platform data on max8925

Mark Brown broonie at opensource.wolfsonmicro.com
Sun Jul 10 19:17:31 EST 2011


On Sun, Jul 10, 2011 at 04:20:27PM +0900, Grant Likely wrote:
> On Fri, Jul 08, 2011 at 06:20:26PM +0800, Haojian Zhuang wrote:

> > +	if (pdata == NULL)
> > +		return NULL;
> > +	pdata->regulator[0] = kzalloc(sizeof(struct regulator_init_data)
> > +			* MAX8925_MAX_REGULATOR, GFP_KERNEL);

> ditto.

> Is it appropriate to allocated the entire table of regulators?  From
> the parse_regulator function above, it looks like only one of the
> regulators will actually get registered (I've not dug deeply into what
> the driver needs here though).

If the code/binding doesn't allow the use of all the regulators on the
device the code is probably wrong, it'd be very unusual to have hardware
like that.


More information about the devicetree-discuss mailing list