goto scrub;
if (init_data && init_data->supply_regulator)
----- supply = init_data->supply_regulator;
+++++ rdev->supply_name = init_data->supply_regulator;
else if (regulator_desc->supply_name)
----- supply = regulator_desc->supply_name;
-----
----- if (supply) {
----- struct regulator_dev *r;
----
---- r = regulator_dev_lookup(dev, supply, &ret);
----
---- 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;
-- - }
-- -
-- - ret = set_supply(rdev, r);
-- - if (ret < 0)
---- goto scrub;
-- -
-- - /* Enable supply if rail is enabled */
-- - if (_regulator_is_enabled(rdev)) {
-- - ret = regulator_enable(rdev->supply);
-- - if (ret < 0)
-- - goto scrub;
---- }
-- - }
+++++ rdev->supply_name = regulator_desc->supply_name;
- r = regulator_dev_lookup(dev, supply, &ret);
-
- 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;
- }
-
- - ret = set_supply(rdev, r);
- - if (ret < 0)
- - goto scrub;
- -
- - /* Enable supply if rail is enabled */
- - if (_regulator_is_enabled(rdev)) {
- - ret = regulator_enable(rdev->supply);
- - if (ret < 0)
- - goto scrub;
- - }
- - }
- -
-----add_dev:
/* add consumers devices */
if (init_data) {
for (i = 0; i < init_data->num_consumer_supplies; i++) {