X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fplatform%2Fx86%2Ftc1100-wmi.c;fp=drivers%2Fplatform%2Fx86%2Ftc1100-wmi.c;h=44166003d4ef15f12b73ee71bff7f2fadcd9181e;hb=ed2a95f3ce60fe24fea59633d19e8f6d993ec4ea;hp=b4a4aa9ee482edacecb4224b4245ee8db2ba0c7f;hpb=24449b49ec00d239c737dd93e76b198d5c0f9312;p=linux-2.6-omap-h63xx.git diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/tc1100-wmi.c index b4a4aa9ee48..44166003d4e 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) return -ENODEV; obj = (union acpi_object *) result.pointer; - if (obj && obj->type == ACPI_TYPE_BUFFER && - obj->buffer.length == sizeof(u32)) { - tmp = *((u32 *) obj->buffer.pointer); + if (obj && obj->type == ACPI_TYPE_INTEGER) { + tmp = obj->integer.value; } else { tmp = 0; } @@ -109,7 +108,7 @@ static int get_state(u32 *out, u8 instance) *out = (tmp == 3) ? 1 : 0; return 0; case TC1100_INSTANCE_JOGDIAL: - *out = (tmp == 1) ? 1 : 0; + *out = (tmp == 1) ? 0 : 1; return 0; default: return -ENODEV;