amba: Make use of bus_type functions
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 26 Jan 2021 16:58:35 +0000 (17:58 +0100)
committerUwe Kleine-König <uwe@kleine-koenig.org>
Tue, 2 Feb 2021 13:26:02 +0000 (14:26 +0100)
commitf170b59fedd733b92f58c4d7c8357fbf7601d623
tree59a4fcd89ce86de32f068c2052f17a348188ae7e
parent3fd269e74f2feec973f45ee11d822faeda4fe284
amba: Make use of bus_type functions

Instead of assigning the needed functions for each driver separately do it
only once in amba_bustype. Move the definition of the functions to their
proper place among the other callbacks used there. Note that the bus's
shutdown function might be called for unbound devices, too, so it needs
additional guarding.

This prepares getting rid of these callbacks in struct device_driver.

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210126165835.687514-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
drivers/amba/bus.c