summaryrefslogtreecommitdiff
path: root/drivers/base/base.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-11 12:23:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-18 11:00:48 +0300
commited9f918174cb35ba51d2fc86a613305dd8bc4cfe (patch)
treea0a3fb21add95b53e1921168f758068aa0cd0c6c /drivers/base/base.h
parent504450d05c545a839b22542c72ddc388740462ac (diff)
downloadlinux-ed9f918174cb35ba51d2fc86a613305dd8bc4cfe.tar.xz
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>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r--drivers/base/base.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 2eb722d89f10..3d1da1027206 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -130,6 +130,7 @@ struct kobject *virtual_device_parent(struct device *dev);
extern int bus_add_device(struct device *dev);
extern void bus_probe_device(struct device *dev);
extern void bus_remove_device(struct device *dev);
+void bus_notify(struct device *dev, enum bus_notifier_event value);
extern int bus_add_driver(struct device_driver *drv);
extern void bus_remove_driver(struct device_driver *drv);