driver core: bus: constify bus_get_kset()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2023 11:13:28 +0000 (12:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 09:43:41 +0000 (10:43 +0100)
The bus_get_kset() function should be taking 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-20-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/bus.c
include/linux/device/bus.h

index 0920fb117896c611fca4387a6dee301c9e9c60eb..c394727b8253c14d2388b5c1a42779f95807a4e1 100644 (file)
@@ -987,7 +987,7 @@ void bus_notify(struct device *dev, enum bus_notifier_event value)
        subsys_put(sp);
 }
 
-struct kset *bus_get_kset(struct bus_type *bus)
+struct kset *bus_get_kset(const struct bus_type *bus)
 {
        struct subsys_private *sp = bus_to_subsys(bus);
        struct kset *kset;
index c0a034ff59b7e606d988c5c0df53d0962c36bf19..425d79d6cf69b2acdd7fcb53714ae74e23ac12e5 100644 (file)
@@ -281,6 +281,6 @@ enum bus_notifier_event {
        BUS_NOTIFY_DRIVER_NOT_BOUND,
 };
 
-extern struct kset *bus_get_kset(struct bus_type *bus);
+extern struct kset *bus_get_kset(const struct bus_type *bus);
 
 #endif