Skip to content

Commit

Permalink
regmap: Correct comparison in regmap_cached
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
charleskeepax authored and broonie committed Feb 13, 2018
1 parent 7928b2c commit 71df179
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 71df179

Please sign in to comment.