diff options
author | Lee, Chun-Yi <joeyli.kernel@gmail.com> | 2011-05-27 02:52:14 -0400 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2011-05-27 12:40:10 -0400 |
commit | 987dfbaa65b2c3568b85e29d2598da08a011ee09 (patch) | |
tree | 0f19173b53cd47b11e2e0de579085700ee02b35e /drivers/platform | |
parent | d436514e21b827ab602d1714028c34179c42d09f (diff) |
acer-wmi: support integer return type from WMI methods
Acer WMID_GUID1/2 method's return value was declared to integer
type on Gateway notebook.
So, add this patch for support integer return type.
Reference: bko#33032
https://bugzilla.kernel.org/show_bug.cgi?id=33032
Tested on Gateway NV5909H laptop
Tested-by: Filipus Klutiero <chealer@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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 5dc843bfc6c2..005417bd429e 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
@@ -754,6 +754,8 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out) | |||
754 | (obj->buffer.length == sizeof(u32) || | 754 | (obj->buffer.length == sizeof(u32) || |
755 | obj->buffer.length == sizeof(u64))) { | 755 | obj->buffer.length == sizeof(u64))) { |
756 | tmp = *((u32 *) obj->buffer.pointer); | 756 | tmp = *((u32 *) obj->buffer.pointer); |
757 | } else if (obj->type == ACPI_TYPE_INTEGER) { | ||
758 | tmp = (u32) obj->integer.value; | ||
757 | } else { | 759 | } else { |
758 | tmp = 0; | 760 | tmp = 0; |
759 | } | 761 | } |
@@ -884,6 +886,8 @@ static acpi_status WMID_set_capabilities(void) | |||
884 | (obj->buffer.length == sizeof(u32) || | 886 | (obj->buffer.length == sizeof(u32) || |
885 | obj->buffer.length == sizeof(u64))) { | 887 | obj->buffer.length == sizeof(u64))) { |
886 | devices = *((u32 *) obj->buffer.pointer); | 888 | devices = *((u32 *) obj->buffer.pointer); |
889 | } else if (obj->type == ACPI_TYPE_INTEGER) { | ||
890 | devices = (u32) obj->integer.value; | ||
887 | } else { | 891 | } else { |
888 | kfree(out.pointer); | 892 | kfree(out.pointer); |
889 | return AE_ERROR; | 893 | return AE_ERROR; |
@@ -1636,6 +1640,8 @@ static u32 get_wmid_devices(void) | |||
1636 | (obj->buffer.length == sizeof(u32) || | 1640 | (obj->buffer.length == sizeof(u32) || |
1637 | obj->buffer.length == sizeof(u64))) { | 1641 | obj->buffer.length == sizeof(u64))) { |
1638 | devices = *((u32 *) obj->buffer.pointer); | 1642 | devices = *((u32 *) obj->buffer.pointer); |
1643 | } else if (obj->type == ACPI_TYPE_INTEGER) { | ||
1644 | devices = (u32) obj->integer.value; | ||
1639 | } | 1645 | } |
1640 | 1646 | ||
1641 | kfree(out.pointer); | 1647 | kfree(out.pointer); |