summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorLee, Chun-Yi <joeyli.kernel@gmail.com>2011-05-22 01:33:53 +0200
committerMatthew Garrett <mjg@redhat.com>2011-05-27 18:38:49 +0200
commitab6a931620cfa5c565b351d1982306c3c8b97f96 (patch)
tree57116a55dde28eb422f1718f306a9ec2ed85c5ea /drivers/platform
parentacer-wmi: check the existence of internal 3G device when set capability (diff)
downloadlinux-ab6a931620cfa5c565b351d1982306c3c8b97f96.tar.xz
linux-ab6a931620cfa5c565b351d1982306c3c8b97f96.zip
acer-wmi: allow 64-bits return buffer from WMI methods
Acer WMID_GUID1/2 method's return buffer was declared to 64-bits on some Acer notebook, but WMI method only use 32-bits in return buffer. So, add this patch for allow 64-bits return buffer. Reference: bko#34142 https://bugzilla.kernel.org/show_bug.cgi?id=34142 Tested on Acer Travelmate 5735Z-452G32Mnss Tested-by: Melchior FRANZ <melchior.franz@gmail.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/acer-wmi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 92ee4d637270..48219117823b 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -750,7 +750,8 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out)
obj = (union acpi_object *) result.pointer;
if (obj && obj->type == ACPI_TYPE_BUFFER &&
- obj->buffer.length == sizeof(u32)) {
+ (obj->buffer.length == sizeof(u32) ||
+ obj->buffer.length == sizeof(u64))) {
tmp = *((u32 *) obj->buffer.pointer);
} else {
tmp = 0;
@@ -879,7 +880,8 @@ static acpi_status WMID_set_capabilities(void)
obj = (union acpi_object *) out.pointer;
if (obj && obj->type == ACPI_TYPE_BUFFER &&
- obj->buffer.length == sizeof(u32)) {
+ (obj->buffer.length == sizeof(u32) ||
+ obj->buffer.length == sizeof(u64))) {
devices = *((u32 *) obj->buffer.pointer);
} else {
kfree(out.pointer);
@@ -1522,7 +1524,8 @@ static u32 get_wmid_devices(void)
obj = (union acpi_object *) out.pointer;
if (obj && obj->type == ACPI_TYPE_BUFFER &&
- obj->buffer.length == sizeof(u32)) {
+ (obj->buffer.length == sizeof(u32) ||
+ obj->buffer.length == sizeof(u64))) {
devices = *((u32 *) obj->buffer.pointer);
}