summaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-02-22 20:51:42 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-03-02 20:55:47 +0100
commit3c36fe9302d153283a0cea9e4e25a9e2143ac232 (patch)
tree4136b715eb1f3acd078fcc5dd3e7a7077e79f3cd /include/acpi
parent7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3 (diff)
downloadlinux-stable-3c36fe9302d153283a0cea9e4e25a9e2143ac232.tar.gz
linux-stable-3c36fe9302d153283a0cea9e4e25a9e2143ac232.tar.bz2
linux-stable-3c36fe9302d153283a0cea9e4e25a9e2143ac232.zip
ACPI: bus: Introduce acpi_bus_for_each_dev()
In order to avoid exposing acpi_bus_type to modules, introduce an acpi_bus_for_each_dev() helper for iterating over all ACPI device objects and make typec_link_ports() use it instead of the raw bus_for_each_dev() along with acpi_bus_type. Having done that, drop the acpi_bus_type export. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index ca88c4706f2b..3f7f01f03869 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -480,6 +480,8 @@ void acpi_initialize_hp_context(struct acpi_device *adev,
/* acpi_device.dev.bus == &acpi_bus_type */
extern struct bus_type acpi_bus_type;
+int acpi_bus_for_each_dev(int (*fn)(struct device *, void *), void *data);
+
/*
* Events
* ------