Browse Source

regulator: da903x: make da903x_is_enabled return 0 or 1

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mike Rapoport 16 năm trước cách đây
mục cha
commit
961869048b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/regulator/da903x.c

+ 1 - 1
drivers/regulator/da903x.c

@@ -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 */