soc: sunxi: sram: Prevent the driver from being unbound
authorSamuel Holland <samuel@sholland.org>
Mon, 15 Aug 2022 04:12:41 +0000 (23:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:39:40 +0000 (10:39 +0200)
commit861adc2b203728bd1c8c7a4a67d0ab655c975d85
tree77c679562df6cc11f1829e7ddeadaa707c46cd0d
parent8b07378ebe43a001d928d6704d0e49215ba81a95
soc: sunxi: sram: Prevent the driver from being unbound

[ Upstream commit 90e10a1fcd9b24b4ba8c0d35136127473dcd829e ]

This driver exports a regmap tied to the platform device (as opposed to
a syscon, which exports a regmap tied to the OF node). Because of this,
the driver can never be unbound, as that would destroy the regmap. Use
builtin_platform_driver_probe() to enforce this limitation.

Fixes: 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")
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-5-samuel@sholland.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/sunxi/sunxi_sram.c