2008-11-25 08:20:10

by Mike Rapoport

[permalink] [raw]
Subject: [PATCH] regulator: da903x: make da903x_is_enabled return 0 or 1


Signed-off-by: Mike Rapoport <[email protected]>
---
drivers/regulator/da903x.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c
index 83101d6..fe77730 100644
--- a/drivers/regulator/da903x.c
+++ b/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 */
--
1.5.6.4


2008-11-25 11:43:27

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH] regulator: da903x: make da903x_is_enabled return 0 or 1

On Tue, 2008-11-25 at 10:19 +0200, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport <[email protected]>
> ---
> drivers/regulator/da903x.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

Applied.

Thanks.

Liam