diff options
| author | Yazen Ghannam <yazen.ghannam@amd.com> | 2025-10-17 13:26:28 +0000 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2025-10-27 15:45:22 +0100 |
| commit | 83be4bee57f0374ff751aaff3fef4af0af66ec81 (patch) | |
| tree | 079192943dfd94adbc39f67b50fa1199d2cf7247 /include | |
| parent | 6553c68bc73dccfb3c8a9971ee40ed378adc0df4 (diff) | |
ACPI: PRM: Add acpi_prm_handler_available()
Add a helper function to check if a PRM handler/module is present.
This can be used during init time by code that depends on a particular
handler. If the handler is not present, then the code does not need to
be loaded.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: "Mario Limonciello (AMD)" <superm1@kernel.org>
Acked-by: "Rafael J. Wysocki (Intel)" <rafael@kernel.org>
Link: https://patch.msgid.link/all/20251017-wip-atl-prm-v2-1-7ab1df4a5fbc@amd.com
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/prmt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/prmt.h b/include/linux/prmt.h index c53ab287e932..8cdc987de963 100644 --- a/include/linux/prmt.h +++ b/include/linux/prmt.h @@ -4,9 +4,11 @@ #ifdef CONFIG_ACPI_PRMT void init_prmt(void); +bool acpi_prm_handler_available(const guid_t *handler_guid); int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer); #else static inline void init_prmt(void) { } +static inline bool acpi_prm_handler_available(const guid_t *handler_guid) { return false; } static inline int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer) { return -EOPNOTSUPP; |
