Skip to contentSkip to conversation

regulator: Add stub for devm_regulator_get_exclusive

PATCH RESEND New Axel Lin 1 participant 1 message Sep 17, 2014 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH RESEND v2 1/1 regulator: Add stub for devm_regulator_get_exclusive

Also makes regulator_get_exclusive and devm_regulator_get_exclusive stub functions return error pointer.

---
Now drivers/gpu/drm/msm/hdmi/hdmi.c is using devm_regulator_get instead of devm_regulator_get_exclusive.
commit 3e87599b68e7929a84a32ab65ad17b79a3f271f6 "drm/msm/mdp4: add LVDS panel support"
So I remove the build error message in commit log.

 include/linux/regulator/consumer.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
include/linux/regulator/consumer.h +7 -1
index f8a8733..66473e3 100644
@@ -262,7 +262,13 @@ devm_regulator_get(struct device *dev, const char *id)
 static inline struct regulator *__must_check
 regulator_get_exclusive(struct device *dev, const char *id)
 {
-	return NULL;
+	return ERR_PTR(-ENODEV);
+}
+
+static inline struct regulator *__must_check
+devm_regulator_get_exclusive(struct device *dev, const char *id)
+{
+	return ERR_PTR(-ENODEV);
 }
 
 static inline struct regulator *__must_check
Signature · 1 line
1.9.1