Loading drivers/regulator/core.c +20 −3 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ static const char *rdev_get_name(struct regulator_dev *rdev) * @supply: regulator supply name * * Extract the regulator device node corresponding to the supply name. * retruns the device node corresponding to the regulator if found, else * returns the device node corresponding to the regulator if found, else * returns NULL. */ static struct device_node *of_get_regulator(struct device *dev, const char *supply) Loading Loading @@ -1229,7 +1229,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, struct regulator_dev *rdev; struct regulator *regulator = ERR_PTR(-EPROBE_DEFER); const char *devname = NULL; int ret; int ret = 0; if (id == NULL) { pr_err("get() with no identifier\n"); Loading @@ -1245,6 +1245,15 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, if (rdev) goto found; /* * If we have return value from dev_lookup fail, we do not expect to * succeed, so, quit with appropriate error value */ if (ret) { regulator = ERR_PTR(ret); goto out; } if (board_wants_dummy_regulator) { rdev = dummy_regulator_rdev; goto found; Loading Loading @@ -3512,7 +3521,14 @@ regulator_register(const struct regulator_desc *regulator_desc, r = regulator_dev_lookup(dev, supply, &ret); if (!r) { if (ret == -ENODEV) { /* * No supply was specified for this regulator and * there will never be one. */ ret = 0; goto add_dev; } else if (!r) { dev_err(dev, "Failed to find supply %s\n", supply); ret = -EPROBE_DEFER; goto scrub; Loading @@ -3530,6 +3546,7 @@ regulator_register(const struct regulator_desc *regulator_desc, } } add_dev: /* add consumers devices */ if (init_data) { for (i = 0; i < init_data->num_consumer_supplies; i++) { Loading drivers/regulator/max1586.c +1 −2 Original line number Diff line number Diff line Loading @@ -232,7 +232,6 @@ static int max1586_pmic_remove(struct i2c_client *client) int i; for (i = 0; i <= MAX1586_V6; i++) if (max1586->rdev[i]) regulator_unregister(max1586->rdev[i]); return 0; } Loading drivers/regulator/max8649.c +2 −4 Original line number Diff line number Diff line Loading @@ -275,10 +275,8 @@ static int max8649_regulator_remove(struct i2c_client *client) { struct max8649_regulator_info *info = i2c_get_clientdata(client); if (info) { if (info->regulator) if (info) regulator_unregister(info->regulator); } return 0; } Loading drivers/regulator/max8660.c +1 −2 Original line number Diff line number Diff line Loading @@ -426,7 +426,6 @@ static int max8660_remove(struct i2c_client *client) int i; for (i = 0; i < MAX8660_V_END; i++) if (max8660->rdev[i]) regulator_unregister(max8660->rdev[i]); return 0; } Loading drivers/regulator/s5m8767.c +2 −4 Original line number Diff line number Diff line Loading @@ -923,7 +923,6 @@ static int s5m8767_pmic_probe(struct platform_device *pdev) return 0; err: for (i = 0; i < s5m8767->num_regulators; i++) if (rdev[i]) regulator_unregister(rdev[i]); return ret; Loading @@ -936,7 +935,6 @@ static int s5m8767_pmic_remove(struct platform_device *pdev) int i; for (i = 0; i < s5m8767->num_regulators; i++) if (rdev[i]) regulator_unregister(rdev[i]); return 0; Loading Loading
drivers/regulator/core.c +20 −3 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ static const char *rdev_get_name(struct regulator_dev *rdev) * @supply: regulator supply name * * Extract the regulator device node corresponding to the supply name. * retruns the device node corresponding to the regulator if found, else * returns the device node corresponding to the regulator if found, else * returns NULL. */ static struct device_node *of_get_regulator(struct device *dev, const char *supply) Loading Loading @@ -1229,7 +1229,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, struct regulator_dev *rdev; struct regulator *regulator = ERR_PTR(-EPROBE_DEFER); const char *devname = NULL; int ret; int ret = 0; if (id == NULL) { pr_err("get() with no identifier\n"); Loading @@ -1245,6 +1245,15 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, if (rdev) goto found; /* * If we have return value from dev_lookup fail, we do not expect to * succeed, so, quit with appropriate error value */ if (ret) { regulator = ERR_PTR(ret); goto out; } if (board_wants_dummy_regulator) { rdev = dummy_regulator_rdev; goto found; Loading Loading @@ -3512,7 +3521,14 @@ regulator_register(const struct regulator_desc *regulator_desc, r = regulator_dev_lookup(dev, supply, &ret); if (!r) { if (ret == -ENODEV) { /* * No supply was specified for this regulator and * there will never be one. */ ret = 0; goto add_dev; } else if (!r) { dev_err(dev, "Failed to find supply %s\n", supply); ret = -EPROBE_DEFER; goto scrub; Loading @@ -3530,6 +3546,7 @@ regulator_register(const struct regulator_desc *regulator_desc, } } add_dev: /* add consumers devices */ if (init_data) { for (i = 0; i < init_data->num_consumer_supplies; i++) { Loading
drivers/regulator/max1586.c +1 −2 Original line number Diff line number Diff line Loading @@ -232,7 +232,6 @@ static int max1586_pmic_remove(struct i2c_client *client) int i; for (i = 0; i <= MAX1586_V6; i++) if (max1586->rdev[i]) regulator_unregister(max1586->rdev[i]); return 0; } Loading
drivers/regulator/max8649.c +2 −4 Original line number Diff line number Diff line Loading @@ -275,10 +275,8 @@ static int max8649_regulator_remove(struct i2c_client *client) { struct max8649_regulator_info *info = i2c_get_clientdata(client); if (info) { if (info->regulator) if (info) regulator_unregister(info->regulator); } return 0; } Loading
drivers/regulator/max8660.c +1 −2 Original line number Diff line number Diff line Loading @@ -426,7 +426,6 @@ static int max8660_remove(struct i2c_client *client) int i; for (i = 0; i < MAX8660_V_END; i++) if (max8660->rdev[i]) regulator_unregister(max8660->rdev[i]); return 0; } Loading
drivers/regulator/s5m8767.c +2 −4 Original line number Diff line number Diff line Loading @@ -923,7 +923,6 @@ static int s5m8767_pmic_probe(struct platform_device *pdev) return 0; err: for (i = 0; i < s5m8767->num_regulators; i++) if (rdev[i]) regulator_unregister(rdev[i]); return ret; Loading @@ -936,7 +935,6 @@ static int s5m8767_pmic_remove(struct platform_device *pdev) int i; for (i = 0; i < s5m8767->num_regulators; i++) if (rdev[i]) regulator_unregister(rdev[i]); return 0; Loading