Skip to contentSkip to conversation

regulator: da903x: make da903x_is_enabled return 0 or 1

PATCH Applied Mike Rapoport 2 participants 2 messages Nov 25, 2008 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: da903x: make da903x_is_enabled return 0 or 1

---
 drivers/regulator/da903x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/da903x.c +1 -1
index 83101d6..fe77730 100644
@@ -159,7 +159,7 @@ static int da903x_is_enabled(struct regulator_dev *rdev)
 	if (ret)
 		return ret;
 
-	return reg_val & (1 << info->enable_bit);
+	return !!(reg_val & (1 << info->enable_bit));
 }
 
 /* DA9030 specific operations */
Signature · 1 line
1.5.6.4