linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regmap: Fix work_buf switching for page update during virtual range access.
@ 2012-06-18 12:04 Krystian Garbaciak
  2012-06-19  9:52 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Krystian Garbaciak @ 2012-06-18 12:04 UTC (permalink / raw)
  To: Mark Brown; +Cc: Greg Kroah-Hartman, linux-kernel, Anthony Olech

After page update, orginal work_buf has to be restored regardless of
the result.

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regmap: Fix work_buf switching for page update during virtual range access.
  2012-06-18 12:04 [PATCH] regmap: Fix work_buf switching for page update during virtual range access Krystian Garbaciak
@ 2012-06-19  9:52 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-06-19  9:52 UTC (permalink / raw)
  To: Krystian Garbaciak; +Cc: Greg Kroah-Hartman, linux-kernel, Anthony Olech

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-19  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-18 12:04 [PATCH] regmap: Fix work_buf switching for page update during virtual range access Krystian Garbaciak
2012-06-19  9:52 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).