Commit 38cdadef authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

driver core: make subsys_dev_iter_next() static



The function subsys_dev_iter_next() is only used in drivers/base/bus.c
so make it static to that file and remove the global export.

Reviewed-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230109175810.2965448-4-gregkh@linuxfoundation.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e45fc55
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -946,7 +946,7 @@ static void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *
 * free to do whatever it wants to do with the device including
 * free to do whatever it wants to do with the device including
 * calling back into subsys code.
 * calling back into subsys code.
 */
 */
struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter)
static struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter)
{
{
	struct klist_node *knode;
	struct klist_node *knode;
	struct device *dev;
	struct device *dev;
@@ -960,7 +960,6 @@ struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter)
			return dev;
			return dev;
	}
	}
}
}
EXPORT_SYMBOL_GPL(subsys_dev_iter_next);


/**
/**
 * subsys_dev_iter_exit - finish iteration
 * subsys_dev_iter_exit - finish iteration
+0 −1
Original line number Original line Diff line number Diff line
@@ -154,7 +154,6 @@ struct subsys_dev_iter {
	struct klist_iter		ki;
	struct klist_iter		ki;
	const struct device_type	*type;
	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);
void subsys_dev_iter_exit(struct subsys_dev_iter *iter);


int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,