Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be5f9b15 authored by Charles Keepax's avatar Charles Keepax Committed by Greg Kroah-Hartman
Browse files

regmap: Correct comparison in regmap_cached



[ Upstream commit 71df179363a5a733a8932e9afb869760d7559383 ]

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: 1ea975cf ("regmap: Add a function to check if a regmap register is cached")
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 253aa829
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,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)