soc: ti: smartreflex: Simplify getting the opam_sr pointer
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 12 Oct 2022 14:00:32 +0000 (16:00 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 14 Apr 2023 16:03:06 +0000 (18:03 +0200)
commit04523aceae8c89d3c91ff33bdde6892f63a60f35
tree393b6369e0e5348b340c6293389752a57392e5cd
parentaebe916f9e79f3d754da2a7d9e2720d18bbff72b
soc: ti: smartreflex: Simplify getting the opam_sr pointer

The probe function stores the sr_info pointer using
platform_set_drvdata(). Use the corresponding platform_get_drvdata() to
retrieve that pointer in the remove and shutdown functions.

This simplifies these functions and makes error handling unnecessary.
This is a good thing as at least for .remove() returning an error code
doesn't have the desired effect.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/soc/ti/smartreflex.c