Merge tag 'dm-4.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[cascardo/linux.git] / drivers / regulator / fixed.c
index ff62d69..988a747 100644 (file)
@@ -79,18 +79,8 @@ of_get_fixed_voltage_config(struct device *dev,
                config->enabled_at_boot = true;
 
        config->gpio = of_get_named_gpio(np, "gpio", 0);
-       /*
-        * of_get_named_gpio() currently returns ENODEV rather than
-        * EPROBE_DEFER. This code attempts to be compatible with both
-        * for now; the ENODEV check can be removed once the API is fixed.
-        * of_get_named_gpio() doesn't differentiate between a missing
-        * property (which would be fine here, since the GPIO is optional)
-        * and some other error. Patches have been posted for both issues.
-        * Once they are check in, we should replace this with:
-        * if (config->gpio < 0 && config->gpio != -ENOENT)
-        */
-       if ((config->gpio == -ENODEV) || (config->gpio == -EPROBE_DEFER))
-               return ERR_PTR(-EPROBE_DEFER);
+       if ((config->gpio < 0) && (config->gpio != -ENOENT))
+               return ERR_PTR(config->gpio);
 
        of_property_read_u32(np, "startup-delay-us", &config->startup_delay);