platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
authorMattias Jacobsson <2pi@mok.nu>
Tue, 19 Feb 2019 19:59:53 +0000 (20:59 +0100)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 7 Mar 2019 16:46:29 +0000 (08:46 -0800)
WMI drivers can if they have specified an array of struct wmi_device_id
use the MODULE_DEVICE_TABLE() macro to automatically generate the
appropriate MODULE_ALIAS() output. Thus avoiding to keep both the array
of struct wmi_device_id and the MODULE_ALIAS() declaration(s) in sync.

Change driver to use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().

Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Reviewed-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/dell-wmi.c

index c3166ba73e9ad99a7960529564846b025a5d6541..d118bb73fcaeb3b3517ed2ce46253d8b2a2028e0 100644 (file)
@@ -50,8 +50,6 @@ MODULE_LICENSE("GPL");
 
 static bool wmi_requires_smbios_request;
 
-MODULE_ALIAS("wmi:"DELL_EVENT_GUID);
-
 struct dell_wmi_priv {
        struct input_dev *input_dev;
        u32 interface_version;
@@ -741,3 +739,5 @@ static void __exit dell_wmi_exit(void)
        wmi_driver_unregister(&dell_wmi_driver);
 }
 module_exit(dell_wmi_exit);
+
+MODULE_DEVICE_TABLE(wmi, dell_wmi_id_table);