diff mbox series

[20/38] backports: add linux/efi.h

Message ID 20221011230356.a2efbf35f5db.Ib2c8a1b389e6a5b212332e9cda7b0adb369738a5@changeid (mailing list archive)
State New, archived
Headers show
Series backports updates | expand

Commit Message

Johannes Berg Oct. 11, 2022, 9:04 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

We need efi_rt_services_supported() on older kernels now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/efi.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 backport/backport-include/linux/efi.h
diff mbox series

Patch

diff --git a/backport/backport-include/linux/efi.h b/backport/backport-include/linux/efi.h
new file mode 100644
index 000000000000..c2ac9dd97947
--- /dev/null
+++ b/backport/backport-include/linux/efi.h
@@ -0,0 +1,13 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2022 Intel Corporation
+ */
+#ifndef __BACKPORT_LINUX_EFI_H
+#define __BACKPORT_LINUX_EFI_H
+#include_next <linux/efi.h>
+
+#ifndef EFI_RT_SUPPORTED_GET_VARIABLE
+#define efi_rt_services_supported(...) efi_enabled(EFI_RUNTIME_SERVICES)
+#endif
+
+#endif /* __BACKPORT_LINUX_EFI_H */