diff options
author | Krystian Garbaciak <krystian.garbaciak@diasemi.com> | 2012-06-18 14:04:29 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-19 11:42:56 +0200 |
commit | 632a5b01db8cd4068a06f8a67720ea4f9b00d9b3 (patch) | |
tree | 6cb211520ebfef0c1ccb8d8fdb16b45bb3762bd4 /drivers/base | |
parent | regmap: Add support for register indirect addressing. (diff) | |
download | linux-632a5b01db8cd4068a06f8a67720ea4f9b00d9b3.tar.xz linux-632a5b01db8cd4068a06f8a67720ea4f9b00d9b3.zip |
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@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | 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 83a0166420a4..d912eb2d19ce 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; |