commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=cac7b28c71340ad99f63af3b0726dec463dedc92
branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/2011R1

Avoid extra special casing by setting the cache_bypass flag when we're
not caching.

Signed-off-by: Mark Brown <[email protected]>
---
 drivers/base/regmap/regcache.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 00609bf..179f222 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -82,8 +82,10 @@ int regcache_init(struct regmap *map)
 	int i;
 	void *tmp_buf;
 
-	if (map->cache_type == REGCACHE_NONE)
+	if (map->cache_type == REGCACHE_NONE) {
+		map->cache_bypass = true;
 		return 0;
+	}
 
 	for (i = 0; i < ARRAY_SIZE(cache_types); i++)
 		if (cache_types[i]->type == map->cache_type)
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to