diff mbox series

[5/7] backports: Adapt acpi_evaluate_dsm()

Message ID 20200622213804.26477-6-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to version 5.8-rc2 | expand

Commit Message

Hauke Mehrtens June 22, 2020, 9:38 p.m. UTC
The function signature of acpi_evaluate_dsm() changed in Linux
94116f8126de ("ACPI: Switch to use generic guid_t in
acpi_evaluate_dsm()"), add function to handle this new interface.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/acpi/acpi_bus.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 backport/backport-include/acpi/acpi_bus.h
diff mbox series

Patch

diff --git a/backport/backport-include/acpi/acpi_bus.h b/backport/backport-include/acpi/acpi_bus.h
new file mode 100644
index 00000000..4c7404a2
--- /dev/null
+++ b/backport/backport-include/acpi/acpi_bus.h
@@ -0,0 +1,15 @@ 
+#ifndef _BACKPORTS_ACPI_BUS_H__
+#define _BACKPORTS_ACPI_BUS_H__ 1
+
+#include_next <acpi/acpi_bus.h>
+
+#if LINUX_VERSION_IN_RANGE(3,14,0, 4,13,0) 
+static inline union acpi_object *
+backport_acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4)
+{
+	return acpi_evaluate_dsm(handle, guid->b, rev, func, argv4);
+}
+#define acpi_evaluate_dsm LINUX_BACKPORT(acpi_evaluate_dsm)
+#endif /* 3.14 <= x < 4.13.0 */
+
+#endif /* _BACKPORTS_ACPI_BUS_H__ */