soc: sunxi: sram: Actually claim SRAM regions
authorSamuel Holland <samuel@sholland.org>
Mon, 15 Aug 2022 04:12:40 +0000 (23:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:39:40 +0000 (10:39 +0200)
commit8b07378ebe43a001d928d6704d0e49215ba81a95
tree7cc2358f6118b8ffc7bc876e5952c09c31406d0c
parentd50e0e2f3d94e71bc74536f23476cca423943aa6
soc: sunxi: sram: Actually claim SRAM regions

[ Upstream commit fd362baad2e659ef0fb5652f023a606b248f1781 ]

sunxi_sram_claim() checks the sram_desc->claimed flag before updating
the register, with the intent that only one device can claim a region.
However, this was ineffective because the flag was never set.

Fixes: 4af34b572a85 ("drivers: soc: sunxi: Introduce SoC driver to map SRAMs")
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220815041248.53268-4-samuel@sholland.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/sunxi/sunxi_sram.c