driver core: bus: move bus notifier logic into bus.c
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jan 2023 09:23:31 +0000 (10:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 08:00:48 +0000 (09:00 +0100)
commited9f918174cb35ba51d2fc86a613305dd8bc4cfe
treea0a3fb21add95b53e1921168f758068aa0cd0c6c
parent504450d05c545a839b22542c72ddc388740462ac
driver core: bus: move bus notifier logic into bus.c

The logic to touch the bus notifier was open-coded in numberous places
in the driver core.  Clean that up by creating a local bus_notify()
function and have everyone call this function instead, making the
reading of the caller code simpler and easier to maintain over time.

Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230111092331.3946745-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/base.h
drivers/base/bus.c
drivers/base/core.c
drivers/base/dd.c