Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: bus: make bus_sort_breadthfirst() take a const pointer

For some reason, during the big "clean up the driver core for a const
struct bus_type" work, the bus_sort_breadthfirst() call was missed. Fix
this up by changing the type to be a const * as it should be.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/2023121935-stinking-ditzy-fd5d@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+2 -2
+1 -1
drivers/base/bus.c
··· 1030 1030 list_move_tail(&a->p->knode_bus.n_node, list); 1031 1031 } 1032 1032 1033 - void bus_sort_breadthfirst(struct bus_type *bus, 1033 + void bus_sort_breadthfirst(const struct bus_type *bus, 1034 1034 int (*compare)(const struct device *a, 1035 1035 const struct device *b)) 1036 1036 {
+1 -1
include/linux/device/bus.h
··· 232 232 233 233 int bus_for_each_drv(const struct bus_type *bus, struct device_driver *start, 234 234 void *data, int (*fn)(struct device_driver *, void *)); 235 - void bus_sort_breadthfirst(struct bus_type *bus, 235 + void bus_sort_breadthfirst(const struct bus_type *bus, 236 236 int (*compare)(const struct device *a, 237 237 const struct device *b)); 238 238 /*