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