Skip to contentSkip to conversation

regulator: core: Always warn when using a dummy regulator

PATCH In review Mark Brown 2 participants 2 messages Oct 4, 2013 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 regulator: core: Always warn when using a dummy regulator

From: Mark Brown <[email protected]>

This helps people spot if they have missed a supply from a device tree or equivalent data structure.

---
 drivers/regulator/core.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/regulator/core.c +2 -7
index 6333080..13263d1 100644
@@ -1299,13 +1299,8 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
 	 * even if it isn't hooked up and just provide a dummy.
 	 */
 	if (has_full_constraints && allow_dummy) {
-		/*
-		 * Log the substitution if regulator configuration is
-		 * not complete to help development.
-		 */
-		if (!has_full_constraints)
-			pr_warn("%s supply %s not found, using dummy regulator\n",
-				devname, id);
+		pr_warn("%s supply %s not found, using dummy regulator\n",
+			devname, id);
 
 		rdev = dummy_regulator_rdev;
 		goto found;
Signature · 1 line
1.8.4.rc3