From 034842f58b07b88055ddd211d8062c5d6c8cd3db Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Sun, 6 Feb 2011 13:28:35 +0100 Subject: [PATCH] --- yaml --- r: 243068 b: refs/heads/master c: aafa719dcd0cb0c05bb0690c816b13263c8b36e6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/eeepc-wmi.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 7bf026e54326..b0e44ede3d4c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33e0e6fed04dc6067562c65e3e6d551dc0eb11fc +refs/heads/master: aafa719dcd0cb0c05bb0690c816b13263c8b36e6 diff --git a/trunk/drivers/platform/x86/eeepc-wmi.c b/trunk/drivers/platform/x86/eeepc-wmi.c index aa9e1d1719da..391c32bd703e 100644 --- a/trunk/drivers/platform/x86/eeepc-wmi.c +++ b/trunk/drivers/platform/x86/eeepc-wmi.c @@ -75,6 +75,9 @@ MODULE_ALIAS("wmi:"EEEPC_WMI_MGMT_GUID); #define EEEPC_WMI_DEVID_BACKLIGHT 0x00050012 #define EEEPC_WMI_DEVID_TPDLED 0x00100011 +#define EEEPC_WMI_DSTS_STATUS_BIT 0x00000001 +#define EEEPC_WMI_DSTS_PRESENCE_BIT 0x00010000 + static bool hotplug_wireless; module_param(hotplug_wireless, bool, 0444); @@ -265,16 +268,10 @@ static int eeepc_wmi_get_devstate_simple(u32 dev_id) if (ACPI_FAILURE(status)) return -EINVAL; - /* If the device is present, DSTS will always set some bits - * 0x00070000 - 1110000000000000000 - device supported - * 0x00060000 - 1100000000000000000 - not supported - * 0x00020000 - 0100000000000000000 - device supported - * 0x00010000 - 0010000000000000000 - not supported / special mode ? - */ - if (!retval || retval == 0x00060000) + if (!(retval & EEEPC_WMI_DSTS_PRESENCE_BIT)) return -ENODEV; - return retval & 0x1; + return retval & EEEPC_WMI_DSTS_STATUS_BIT; } /*