regulator: core: Take supply regulator from init_data only
Laxman Dewangan [Fri, 24 Aug 2012 07:13:58 +0000 (12:13 +0530)]
As EPROBE_DEFER is not supported in K3.4 and hence if supply
regulator is not found then regulator registration fails.
Setting the supply regulator only from init_data in place of
providing it through desc.

Change-Id: Iebe321abd84fc3bec2c4aa5a4233320efef0387b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/127106
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

drivers/regulator/core.c

index 48bd838..8f410e1 100644 (file)
@@ -3038,8 +3038,10 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
 
        if (init_data && init_data->supply_regulator)
                supply = init_data->supply_regulator;
+#if 0 /* Reenable when EPROBE_DEFER is pulled. */
        else if (regulator_desc->supply_name)
                supply = regulator_desc->supply_name;
+#endif
 
        if (supply) {
                struct regulator_dev *r;