]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regmap: prevent noinc writes from clobbering cache
authorBen Wolsieffer <ben.wolsieffer@hefring.com>
Wed, 1 Nov 2023 14:29:27 +0000 (10:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:27 +0000 (11:08 +0100)
commitdb64ddddeeec555c68d6db7af2c620402dbf19e3
treeba5f008ce2235bfbe724b316e28b88c17e0e5a25
parent004d4002534ef7124ecd0632c7509be2d4af8f68
regmap: prevent noinc writes from clobbering cache

[ Upstream commit 984a4afdc87a1fc226fd657b1cd8255c13d3fc1a ]

Currently, noinc writes are cached as if they were standard incrementing
writes, overwriting unrelated register values in the cache. Instead, we
want to cache the last value written to the register, as is done in the
accelerated noinc handler (regmap_noinc_readwrite).

Fixes: cdf6b11daa77 ("regmap: Add regmap_noinc_write API")
Signed-off-by: Ben Wolsieffer <ben.wolsieffer@hefring.com>
Link: https://lore.kernel.org/r/20231101142926.2722603-2-ben.wolsieffer@hefring.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/regmap/regmap.c