diff options
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/tc1100-wmi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/tc1100-wmi.c index b4a4aa9ee482..44166003d4ef 100644 --- a/drivers/platform/x86/tc1100-wmi.c +++ b/drivers/platform/x86/tc1100-wmi.c | |||
@@ -94,9 +94,8 @@ static int get_state(u32 *out, u8 instance) | |||
94 | return -ENODEV; | 94 | return -ENODEV; |
95 | 95 | ||
96 | obj = (union acpi_object *) result.pointer; | 96 | obj = (union acpi_object *) result.pointer; |
97 | if (obj && obj->type == ACPI_TYPE_BUFFER && | 97 | if (obj && obj->type == ACPI_TYPE_INTEGER) { |
98 | obj->buffer.length == sizeof(u32)) { | 98 | tmp = obj->integer.value; |
99 | tmp = *((u32 *) obj->buffer.pointer); | ||
100 | } else { | 99 | } else { |
101 | tmp = 0; | 100 | tmp = 0; |
102 | } | 101 | } |
@@ -109,7 +108,7 @@ static int get_state(u32 *out, u8 instance) | |||
109 | *out = (tmp == 3) ? 1 : 0; | 108 | *out = (tmp == 3) ? 1 : 0; |
110 | return 0; | 109 | return 0; |
111 | case TC1100_INSTANCE_JOGDIAL: | 110 | case TC1100_INSTANCE_JOGDIAL: |
112 | *out = (tmp == 1) ? 1 : 0; | 111 | *out = (tmp == 1) ? 0 : 1; |
113 | return 0; | 112 | return 0; |
114 | default: | 113 | default: |
115 | return -ENODEV; | 114 | return -ENODEV; |