From: Greg Kroah-Hartman Date: Mon, 9 Jan 2023 17:58:05 +0000 (+0100) Subject: driver core: make bus_get_device_klist() static X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8afbb4273977f055db219a22daaafe64be10fb95;p=linux.git driver core: make bus_get_device_klist() static No one calls this function outside of drivers/base/bus.c so make it static so it does not need to be exported anymore. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230109175810.2965448-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 4ec6dbab73be5..4425f962bf516 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -897,11 +897,10 @@ struct kset *bus_get_kset(struct bus_type *bus) } EXPORT_SYMBOL_GPL(bus_get_kset); -struct klist *bus_get_device_klist(struct bus_type *bus) +static struct klist *bus_get_device_klist(struct bus_type *bus) { return &bus->p->klist_devices; } -EXPORT_SYMBOL_GPL(bus_get_device_klist); /* * Yes, this forcibly breaks the klist abstraction temporarily. It diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index d8b29ccd07e56..01077c503d611 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -287,6 +287,5 @@ extern int bus_unregister_notifier(struct bus_type *bus, #define BUS_NOTIFY_DRIVER_NOT_BOUND 0x00000008 /* driver fails to be bound */ extern struct kset *bus_get_kset(struct bus_type *bus); -extern struct klist *bus_get_device_klist(struct bus_type *bus); #endif