From 597902a808da2e0cc6971ce8dc144f68f61f4581 Mon Sep 17 00:00:00 2001 From: Christoffer Sandberg Date: Mon, 7 Dec 2020 16:37:26 +0100 Subject: [PATCH] clevo_interfaces: Move module alias defines --- src/clevo_interfaces.h | 11 +++++++++++ src/clevo_wmi.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/clevo_interfaces.h b/src/clevo_interfaces.h index dfb4483..40905ed 100644 --- a/src/clevo_interfaces.h +++ b/src/clevo_interfaces.h @@ -59,4 +59,15 @@ u32 clevo_keyboard_remove_interface(struct clevo_interface_t *interface); u32 clevo_evaluate_method(u8 cmd, u32 arg, u32 *result); u32 clevo_get_active_interface_id(char **id_str); +#define MODULE_ALIAS_CLEVO_WMI() \ + MODULE_ALIAS("wmi:" CLEVO_WMI_EVENT_GUID); \ + MODULE_ALIAS("wmi:" CLEVO_WMI_METHOD_GUID); + +#define MODULE_ALIAS_CLEVO_ACPI() \ + MODULE_ALIAS("acpi*:" CLEVO_ACPI_RESOURCE_HID ":*"); + +#define MODULE_ALIAS_CLEVO_INTERFACES() \ + MODULE_ALIAS_CLEVO_WMI(); \ + MODULE_ALIAS_CLEVO_ACPI(); + #endif diff --git a/src/clevo_wmi.c b/src/clevo_wmi.c index 20f6585..a229915 100644 --- a/src/clevo_wmi.c +++ b/src/clevo_wmi.c @@ -159,4 +159,4 @@ MODULE_VERSION("0.0.1"); MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(wmi, clevo_wmi_device_ids); -MODULE_ALIAS("wmi:" CLEVO_WMI_EVENT_GUID); +MODULE_ALIAS_CLEVO_WMI();