[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1370280888-15072-1-git-send-email-swarren@wwwdotorg.org>
Date: Mon, 3 Jun 2013 11:34:48 -0600
From: Stephen Warren <swarren@...dotorg.org>
To: Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org, Stephen Warren <swarren@...dia.com>
Subject: [PATCH] regmap: assume registers are volatile iff no cache
From: Stephen Warren <swarren@...dia.com>
If a regmap has a cache, it's likely that registers are not volatile,
perhaps with exceptions. Otherwise, the cache would not be useful. Encode
this assumption into regmap_volatile()'s default return value, for the
case where a regmap doesn't specify which registers are volatile.
Signed-off-by: Stephen Warren <swarren@...dia.com>
---
drivers/base/regmap/regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 1a01553..feb37af 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -123,7 +123,7 @@ bool regmap_volatile(struct regmap *map, unsigned int reg)
if (map->volatile_table)
return regmap_check_range_table(map, reg, map->volatile_table);
- return true;
+ return (map->cache_type == REGCACHE_NONE);
}
bool regmap_precious(struct regmap *map, unsigned int reg)
--
1.7.10.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