Skip to content

Commit b0a8a59

Browse files
committed
driver core: move struct subsys_dev_iter to a local file
struct subsys_dev_iter is not used by any code outside of drivers/base/bus.c so move it into that file and out of the global bus.h file. Reviewed-by: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/r/20230109175810.2965448-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent af6d074 commit b0a8a59

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/base/bus.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,11 @@ void bus_sort_breadthfirst(struct bus_type *bus,
911911
}
912912
EXPORT_SYMBOL_GPL(bus_sort_breadthfirst);
913913

914+
struct subsys_dev_iter {
915+
struct klist_iter ki;
916+
const struct device_type *type;
917+
};
918+
914919
/**
915920
* subsys_dev_iter_init - initialize subsys device iterator
916921
* @iter: subsys iterator to initialize

include/linux/device/bus.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ int device_match_acpi_handle(struct device *dev, const void *handle);
150150
int device_match_any(struct device *dev, const void *unused);
151151

152152
/* iterator helpers for buses */
153-
struct subsys_dev_iter {
154-
struct klist_iter ki;
155-
const struct device_type *type;
156-
};
157-
158153
int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
159154
int (*fn)(struct device *dev, void *data));
160155
struct device *bus_find_device(struct bus_type *bus, struct device *start,

0 commit comments

Comments
 (0)