]> www.infradead.org Git - users/jedix/linux-maple.git/commit
soc: ti: pruss: factor out memories setup
authorKousik Sanagavarapu <five231003@gmail.com>
Sun, 25 Aug 2024 08:48:42 +0000 (14:18 +0530)
committerNishanth Menon <nm@ti.com>
Wed, 28 Aug 2024 17:18:02 +0000 (12:18 -0500)
commit952ceb03787dde88fc713c7453824e25bf12cb3a
tree962fc1c3ae5eff139f1aa0434ae551b9a75f02b2
parentb2a0176620db7aa0aa77109d7a8b894755441079
soc: ti: pruss: factor out memories setup

Factor out memories setup code from probe() into a new function
pruss_of_setup_memories().  This sets the stage for introducing auto
cleanup of the device node (done in the subsequent patch), since the
clean up depends on the scope of the pointer and factoring out
code into a separate function obviously limits the scope of the various
variables used in that function.

Apart from the above, this change also has the advantage of making the
code look more neat.

While at it, use dev_err_probe() instead of plain dev_err() as this new
function is called by the probe().

Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
Link: https://lore.kernel.org/r/20240825085714.10736-2-five231003@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/soc/ti/pruss.c