70d5a58248d90e9f379a8a9683a45f1fd815b637
[openwrt/openwrt.git] / target / linux / ipq806x / patches-3.18 / 032-hwspinlock-qcom-Correct-msb-in-regmap_field.patch
1 From bd5717a4632cdecafe82d03de7dcb3b1876e2828 Mon Sep 17 00:00:00 2001
2 From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
3 Date: Fri, 26 Jun 2015 14:47:21 -0700
4 Subject: [PATCH] hwspinlock: qcom: Correct msb in regmap_field
5
6 msb of the regmap_field was mistakenly given the value 32, to set all bits
7 in the regmap update mask; although incorrect this worked until 921cc294,
8 where the mask calculation was corrected.
9
10 Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
11 Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
12 ---
13 drivers/hwspinlock/qcom_hwspinlock.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/hwspinlock/qcom_hwspinlock.c
17 +++ b/drivers/hwspinlock/qcom_hwspinlock.c
18 @@ -123,7 +123,7 @@ static int qcom_hwspinlock_probe(struct
19 for (i = 0; i < QCOM_MUTEX_NUM_LOCKS; i++) {
20 field.reg = base + i * stride;
21 field.lsb = 0;
22 - field.msb = 32;
23 + field.msb = 31;
24
25 bank->lock[i].priv = devm_regmap_field_alloc(&pdev->dev,
26 regmap, field);