soc: fsl: guts: embed fsl_guts_get_svr() in probe()
authorMichael Walle <michael@walle.cc>
Mon, 4 Apr 2022 09:56:05 +0000 (11:56 +0200)
committerShawn Guo <shawnguo@kernel.org>
Mon, 27 Jun 2022 06:51:51 +0000 (14:51 +0800)
commitab4988d6a39348dd8c031ef6db946afb9a543f0f
tree1b2a25741003d0eb1ec9545ecc5fdbf2dbb20ce5
parent6de6cb89fc031cf95cb759bbf9fa00b139e0281a
soc: fsl: guts: embed fsl_guts_get_svr() in probe()

Move the reading of the SVR into the probe function as
fsl_guts_get_svr() is the only user of the static guts variable and this
lets us drop that as well as the malloc() for this variable. Also, we
can unmap the memory region after we accessed it, which will simplify
error handling later.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/soc/fsl/guts.c