2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 15:13:55 +08:00

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: 1ea975cf1e ("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>
This commit is contained in:
Charles Keepax 2018-02-12 18:15:44 +00:00 committed by Mark Brown
parent 7928b2cbe5
commit 71df179363
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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)