Skip to content

Commit 5ae8120

Browse files
committed
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 <[email protected]> Link: https://lore.kernel.org/r/2023121935-stinking-ditzy-fd5d@gregkh Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 64c1668 commit 5ae8120

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/base/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ static void device_insertion_sort_klist(struct device *a, struct list_head *list
10301030
list_move_tail(&a->p->knode_bus.n_node, list);
10311031
}
10321032

1033-
void bus_sort_breadthfirst(struct bus_type *bus,
1033+
void bus_sort_breadthfirst(const struct bus_type *bus,
10341034
int (*compare)(const struct device *a,
10351035
const struct device *b))
10361036
{

include/linux/device/bus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ bus_find_device_by_acpi_dev(const struct bus_type *bus, const void *adev)
232232

233233
int bus_for_each_drv(const struct bus_type *bus, struct device_driver *start,
234234
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,
236236
int (*compare)(const struct device *a,
237237
const struct device *b));
238238
/*

0 commit comments

Comments
 (0)