From: Greg Kroah-Hartman Date: Wed, 8 Feb 2023 11:13:30 +0000 (+0100) Subject: driver core: bus: constify bus_unregister() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ad8685d0f61a6fc1dc2e5874f4924ff5028c5954;p=users%2Fjedix%2Flinux-maple.git driver core: bus: constify bus_unregister() The bus_unregister() function can now take a const * to bus_type, not just a * so fix that up. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-22-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/bus.c b/drivers/base/bus.c index bcff24b11bb38..301b9c6ece864 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -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; diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index 425d79d6cf69b..31be18608f83f 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -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);