driver core: make subsys_dev_iter_init() static
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jan 2023 17:58:07 +0000 (18:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Jan 2023 12:48:57 +0000 (13:48 +0100)
No one outside of drivers/base/bus.c calls this function so make it
static and remove the exported symbol.

Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230109175810.2965448-3-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/bus.c
include/linux/device/bus.h

index f8eb882..f781124 100644 (file)
@@ -923,8 +923,8 @@ EXPORT_SYMBOL_GPL(bus_sort_breadthfirst);
  * otherwise if it is NULL, the iteration starts at the beginning of
  * the list.
  */
-void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *subsys,
-                         struct device *start, const struct device_type *type)
+static void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *subsys,
+                                struct device *start, const struct device_type *type)
 {
        struct klist_node *start_knode = NULL;
 
@@ -933,7 +933,6 @@ void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *subsys,
        klist_iter_init_node(&subsys->p->klist_devices, &iter->ki, start_knode);
        iter->type = type;
 }
-EXPORT_SYMBOL_GPL(subsys_dev_iter_init);
 
 /**
  * subsys_dev_iter_next - iterate to the next device
index 3b1a206..67cb5b2 100644 (file)
@@ -154,10 +154,6 @@ struct subsys_dev_iter {
        struct klist_iter               ki;
        const struct device_type        *type;
 };
-void subsys_dev_iter_init(struct subsys_dev_iter *iter,
-                        struct bus_type *subsys,
-                        struct device *start,
-                        const struct device_type *type);
 struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter);
 void subsys_dev_iter_exit(struct subsys_dev_iter *iter);