mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 06:44:36 -05:00
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
17 lines
495 B
C
17 lines
495 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#include <linux/uuid.h>
|
|
|
|
#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;
|
|
}
|
|
#endif
|