2012-06-18 12:08:53

by Krystian Garbaciak

[permalink] [raw]
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 <[email protected]>
---
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


2012-06-19 09:52:09

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] regmap: Fix work_buf switching for page update during virtual range access.

On Mon, Jun 18, 2012 at 01:04:29PM +0100, Krystian Garbaciak wrote:
> After page update, orginal work_buf has to be restored regardless of
> the result.

Applied, thanks.


Attachments:
(No filename) (171.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments