Skip to content

Commit be5f9b1

Browse files
charleskeepaxgregkh
authored andcommitted
regmap: Correct comparison in regmap_cached
[ Upstream commit 71df179 ] 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: 1ea975c ("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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 253aa82 commit be5f9b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/base/regmap/regmap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ bool regmap_cached(struct regmap *map, unsigned int reg)
9898
int ret;
9999
unsigned int val;
100100

101-
if (map->cache == REGCACHE_NONE)
101+
if (map->cache_type == REGCACHE_NONE)
102102
return false;
103103

104104
if (!map->cache_ops)

0 commit comments

Comments
 (0)