[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1385637042-33201-1-git-send-email-vinceh@nvidia.com>
Date:	Thu, 28 Nov 2013 19:10:42 +0800
From:	Vince Hsu <vinceh@...dia.com>
To:	<lgirdwood@...il.com>, <broonie@...nel.org>, <ldewangan@...dia.com>
CC:	<linux-kernel@...r.kernel.org>, <vinceh@...dia.com>
Subject: [PATCH] regulator: as3722: set the correct current limit
Simple fix to set the correct current limit for SD0/1/6.
Signed-off-by: Vince Hsu <vinceh@...dia.com>
---
 drivers/regulator/as3722-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722-regulator.c
index 5917fe3dc983..b9f1d24c6812 100644
--- a/drivers/regulator/as3722-regulator.c
+++ b/drivers/regulator/as3722-regulator.c
@@ -590,8 +590,8 @@ static int as3722_sd016_set_current_limit(struct regulator_dev *rdev,
 	default:
 		return -EINVAL;
 	}
+	ret <<= ffs(mask) - 1;
 	val = ret & mask;
-	val <<= ffs(mask) - 1;
 	return as3722_update_bits(as3722, reg, mask, val);
 }
 
-- 
1.8.1.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
