aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/x86/eeepc-wmi.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 52274e21ee89..4d38f98aa976 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -49,6 +49,8 @@ MODULE_AUTHOR("Yong Wang <yong.y.wang@intel.com>");
49MODULE_DESCRIPTION("Eee PC WMI Hotkey Driver"); 49MODULE_DESCRIPTION("Eee PC WMI Hotkey Driver");
50MODULE_LICENSE("GPL"); 50MODULE_LICENSE("GPL");
51 51
52#define EEEPC_ACPI_HID "ASUS010" /* old _HID used in eeepc-laptop */
53
52#define EEEPC_WMI_EVENT_GUID "ABBC0F72-8EA1-11D1-00A0-C90629100000" 54#define EEEPC_WMI_EVENT_GUID "ABBC0F72-8EA1-11D1-00A0-C90629100000"
53#define EEEPC_WMI_MGMT_GUID "97845ED0-4E6D-11DE-8A39-0800200C9A66" 55#define EEEPC_WMI_MGMT_GUID "97845ED0-4E6D-11DE-8A39-0800200C9A66"
54 56
@@ -861,6 +863,27 @@ static struct platform_driver platform_driver = {
861 }, 863 },
862}; 864};
863 865
866static acpi_status __init eeepc_wmi_parse_device(acpi_handle handle, u32 level,
867 void *context, void **retval)
868{
869 pr_warning("Found legacy ATKD device (%s)", EEEPC_ACPI_HID);
870 *(bool *)context = true;
871 return AE_CTRL_TERMINATE;
872}
873
874static int __init eeepc_wmi_check_atkd(void)
875{
876 acpi_status status;
877 bool found = false;
878
879 status = acpi_get_devices(EEEPC_ACPI_HID, eeepc_wmi_parse_device,
880 &found, NULL);
881
882 if (ACPI_FAILURE(status) || !found)
883 return 0;
884 return -1;
885}
886
864static int __init eeepc_wmi_init(void) 887static int __init eeepc_wmi_init(void)
865{ 888{
866 int err; 889 int err;
@@ -871,6 +894,16 @@ static int __init eeepc_wmi_init(void)
871 return -ENODEV; 894 return -ENODEV;
872 } 895 }
873 896
897 if (eeepc_wmi_check_atkd()) {
898 pr_warning("WMI device present, but legacy ATKD device is also "
899 "present and enabled.");
900 pr_warning("You probably booted with acpi_osi=\"Linux\" or "
901 "acpi_osi=\"!Windows 2009\"");
902 pr_warning("Can't load eeepc-wmi, use default acpi_osi "
903 "(preferred) or eeepc-laptop");
904 return -ENODEV;
905 }
906
874 platform_device = eeepc_wmi_add(); 907 platform_device = eeepc_wmi_add();
875 if (IS_ERR(platform_device)) { 908 if (IS_ERR(platform_device)) {
876 err = PTR_ERR(platform_device); 909 err = PTR_ERR(platform_device);