driver core: bus: constify bus_unregister()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2023 11:13:30 +0000 (12:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 09:43:45 +0000 (10:43 +0100)
The bus_unregister() function can now take a const * to bus_type, not
just a * so fix that up.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230208111330.439504-22-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/bus.c
include/linux/device/bus.h

index bcff24b11bb38f3fb74690a17ceb185bcd25d762..301b9c6ece8649d1ee195efe6505507f71b983c2 100644 (file)
@@ -925,7 +925,7 @@ EXPORT_SYMBOL_GPL(bus_register);
  * Unregister the child subsystems and the bus itself.
  * Finally, we call bus_put() to release the refcount
  */
-void bus_unregister(struct bus_type *bus)
+void bus_unregister(const struct bus_type *bus)
 {
        struct subsys_private *sp = bus_to_subsys(bus);
        struct kobject *bus_kobj;
index 425d79d6cf69b2acdd7fcb53714ae74e23ac12e5..31be18608f83f02cdd824f51eec5eb87154a2525 100644 (file)
@@ -114,7 +114,7 @@ struct bus_type {
 
 extern int __must_check bus_register(struct bus_type *bus);
 
-extern void bus_unregister(struct bus_type *bus);
+extern void bus_unregister(const struct bus_type *bus);
 
 extern int __must_check bus_rescan_devices(struct bus_type *bus);