diff options
author | Lee, Chun-Yi <joeyli.kernel@gmail.com> | 2011-05-21 19:33:53 -0400 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2011-05-27 12:38:49 -0400 |
commit | ab6a931620cfa5c565b351d1982306c3c8b97f96 (patch) | |
tree | 57116a55dde28eb422f1718f306a9ec2ed85c5ea /drivers | |
parent | a8d1a266eee5f8b822449fe19d1735189377ef47 (diff) |
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')
-rw-r--r-- | drivers/platform/x86/acer-wmi.c | 9 |
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) | |||
750 | 750 | ||
751 | obj = (union acpi_object *) result.pointer; | 751 | obj = (union acpi_object *) result.pointer; |
752 | if (obj && obj->type == ACPI_TYPE_BUFFER && | 752 | if (obj && obj->type == ACPI_TYPE_BUFFER && |
753 | obj->buffer.length == sizeof(u32)) { | 753 | (obj->buffer.length == sizeof(u32) || |
754 | obj->buffer.length == sizeof(u64))) { | ||
754 | tmp = *((u32 *) obj->buffer.pointer); | 755 | tmp = *((u32 *) obj->buffer.pointer); |
755 | } else { | 756 | } else { |
756 | tmp = 0; | 757 | tmp = 0; |
@@ -879,7 +880,8 @@ static acpi_status WMID_set_capabilities(void) | |||
879 | 880 | ||
880 | obj = (union acpi_object *) out.pointer; | 881 | obj = (union acpi_object *) out.pointer; |
881 | if (obj && obj->type == ACPI_TYPE_BUFFER && | 882 | if (obj && obj->type == ACPI_TYPE_BUFFER && |
882 | obj->buffer.length == sizeof(u32)) { | 883 | (obj->buffer.length == sizeof(u32) || |
884 | obj->buffer.length == sizeof(u64))) { | ||
883 | devices = *((u32 *) obj->buffer.pointer); | 885 | devices = *((u32 *) obj->buffer.pointer); |
884 | } else { | 886 | } else { |
885 | kfree(out.pointer); | 887 | kfree(out.pointer); |
@@ -1522,7 +1524,8 @@ static u32 get_wmid_devices(void) | |||
1522 | 1524 | ||
1523 | obj = (union acpi_object *) out.pointer; | 1525 | obj = (union acpi_object *) out.pointer; |
1524 | if (obj && obj->type == ACPI_TYPE_BUFFER && | 1526 | if (obj && obj->type == ACPI_TYPE_BUFFER && |
1525 | obj->buffer.length == sizeof(u32)) { | 1527 | (obj->buffer.length == sizeof(u32) || |
1528 | obj->buffer.length == sizeof(u64))) { | ||
1526 | devices = *((u32 *) obj->buffer.pointer); | 1529 | devices = *((u32 *) obj->buffer.pointer); |
1527 | } | 1530 | } |
1528 | 1531 | ||