Skip to contentSkip to conversation

regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode

PATCH In review Axel Lin 2 participants 2 messages Oct 9, 2018 – Oct 18, 2018 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode

-EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead.

---
 drivers/regulator/stpmic1_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/stpmic1_regulator.c +1 -1
index 96f18083a3b6..e15634edb8ce 100644
@@ -441,7 +441,7 @@ static unsigned int stpmic1_map_mode(unsigned int mode)
 	case STPMIC1_BUCK_MODE_LP:
 		return REGULATOR_MODE_STANDBY;
 	default:
-		return -EINVAL;
+		return REGULATOR_MODE_INVALID;
 	}
 }
 
Signature · 1 line
2.17.1
#1 lore raw

Hi Axel,
Thank you for your comment. As the driver is merged, I will make the change in a future patch-set.
Best regards, Pascal.

Quoted 21 lines · Axel Lin

-EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead.

---
  drivers/regulator/stpmic1_regulator.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/stpmic1_regulator.c +1 -1
index 96f18083a3b6..e15634edb8ce 100644
@@ -441,7 +441,7 @@ static unsigned int stpmic1_map_mode(unsigned int mode)
  	case STPMIC1_BUCK_MODE_LP:
  		return REGULATOR_MODE_STANDBY;
  	default:
-		return -EINVAL;
+		return REGULATOR_MODE_INVALID;
  	}
  }