projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7ce3f0
)
asus-wmi: handle "unknown status" bit
author
Corentin Chary
<
[email protected]
>
Sat, 26 Feb 2011 09:20:34 +0000
(10:20 +0100)
committer
Matthew Garrett
<
[email protected]
>
Mon, 28 Mar 2011 10:07:21 +0000
(06:07 -0400)
Signed-off-by: Corentin Chary <
[email protected]
>
Signed-off-by: Matthew Garrett <
[email protected]
>
drivers/platform/x86/asus-wmi.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/asus-wmi.c
b/drivers/platform/x86/asus-wmi.c
index d0f0931ea5eb46efc744af189233c20613463795..39ce3c1a77127074d169ed0c1d1cc080e18ce783 100644
(file)
--- a/
drivers/platform/x86/asus-wmi.c
+++ b/
drivers/platform/x86/asus-wmi.c
@@
-92,6
+92,7
@@
MODULE_LICENSE("GPL");
/* DSTS masks */
#define ASUS_WMI_DSTS_STATUS_BIT 0x00000001
+#define ASUS_WMI_DSTS_UNKNOWN_BIT 0x00000002
#define ASUS_WMI_DSTS_PRESENCE_BIT 0x00010000
#define ASUS_WMI_DSTS_BRIGHTNESS_MASK 0x000000FF
#define ASUS_WMI_DSTS_MAX_BRIGTH_MASK 0x0000FF00
@@
-270,6
+271,11
@@
static int asus_wmi_get_devstate_bits(u32 dev_id, u32 mask)
if (!(retval & ASUS_WMI_DSTS_PRESENCE_BIT))
return -ENODEV;
+ if (mask == ASUS_WMI_DSTS_STATUS_BIT) {
+ if (retval & ASUS_WMI_DSTS_UNKNOWN_BIT)
+ return -ENODEV;
+ }
+
return retval & mask;
}