diff mbox series

[v2,5/7] ACPI: bus: implement for_each_acpi_consumer_dev when !ACPI

Message ID 20241122-fix-ipu-v2-5-bba65856e9ff@chromium.org
State New
Headers show
Series ipu6: get rid of all the IS_ENABLED(CONFIG_ACPI) | expand

Commit Message

Ricardo Ribalda Nov. 22, 2024, 9:48 a.m. UTC
Provide an implementation of for_each_acpi_consumer_dev that can be use
used when CONFIG_ACPI is not set.

The expression `false && supplier` is used to avoid "variable not used"
warnings.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 include/acpi/acpi_bus.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 4888231422ea..57298c7cfb5d 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -1005,6 +1005,9 @@  static inline int acpi_wait_for_acpi_ipmi(void) { return 0; }
 
 #define acpi_get_physical_device_location(handle, pld) (AE_ERROR)
 
+#define for_each_acpi_consumer_dev(supplier, consumer)			\
+	for (consumer = NULL; false && (supplier);)
+
 #define for_each_acpi_dev_match(adev, hid, uid, hrv)			\
 	for (adev = NULL; false && (hid) && (uid) && (hrv);)