Hi, I have separated out the consumers to the board files. And most of the Init_data is provided there. But the dev pointer was not available at that point of time. The dev pointer needs to be initialized for regulator_get() functions. Hence, I need to init it in the xxx_probe() function. Pls let me know if you have any other ways to fix this ? Regards Mani -----Original Message----- From: Mark Brown [mailto:broonie@xxxxxxxxxxxxx] Sent: Wednesday, December 17, 2008 11:05 PM To: Pillai, Manikandan Cc: linux-omap@xxxxxxxxxxxxxxx Subject: Re: [PATCH 1/2] TPS6235x based Power regulator support added On Tue, Dec 16, 2008 at 03:36:06PM +0530, Manikandan Pillai wrote: > +extern struct regulator_consumer_supply tps62352_core_consumers; > +extern struct regulator_consumer_supply tps62352_mpu_consumers; ... > + /* Register the regulators */ > + if (client->addr == TPS_62352_CORE_ADDR) { > + /* dev needs to be inited since this is required to for get() */ > + tps62352_core_consumers.dev = &client->dev; > + rdev = regulator_register(®ulators[0], &client->dev, > + client); > + } else if (client->addr == TPS_62353_MPU_ADDR) { > + /* dev needs to be inited since this is required to for get() */ > + tps62352_mpu_consumers.dev = &client->dev; > + rdev = regulator_register(®ulators[1], &client->dev, > + client); > + } This should be done in the style of other regulators with the list of consumers passed in as part of the regulator init data supplied by the board. This would then allow you to remove all the conditionals (since the regulator array index is provided for you in the i2c_device_id value you get passed in). -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html