Explorar o código

regmap: Correct comparison in regmap_cached

The cache pointer points to the actual memory used by the cache, as the
comparison here is looking for the type of the cache it should check
against cache_type.

Fixes: 1ea975cf1ef5 ("regmap: Add a function to check if a regmap register is cached")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax %!s(int64=7) %!d(string=hai) anos
pai
achega
71df179363
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/base/regmap/regmap.c

+ 1 - 1
drivers/base/regmap/regmap.c

@@ -99,7 +99,7 @@ bool regmap_cached(struct regmap *map, unsigned int reg)
 	int ret;
 	unsigned int val;
 
-	if (map->cache == REGCACHE_NONE)
+	if (map->cache_type == REGCACHE_NONE)
 		return false;
 
 	if (!map->cache_ops)