[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <201206181207.q5IC7Hbm029241@sw-eng-lt-dc-vm2>
Date: Mon, 18 Jun 2012 13:04:29 +0100
From: Krystian Garbaciak <krystian.garbaciak@...semi.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Anthony Olech <Anthony.Olech@...semi.com>
Subject: [PATCH] regmap: Fix work_buf switching for page update during virtual range access.
After page update, orginal work_buf has to be restored regardless of
the result.
Signed-off-by: Krystian Garbaciak <krystian.garbaciak@...semi.com>
---
drivers/base/regmap/regmap.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 83a0166..d912eb2 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -693,10 +693,11 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg,
range->selector_mask,
win_page << range->selector_shift,
&page_chg);
- if (ret < 0)
- return ret;
map->work_buf = orig_work_buf;
+
+ if (ret < 0)
+ return ret;
}
*reg = range->window_start + win_offset;
--
1.7.0.4
--
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