]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/platform/x86/tc1100-wmi.c
Merge branch 'omap-pool'
[linux-2.6-omap-h63xx.git] / drivers / platform / x86 / tc1100-wmi.c
index b4a4aa9ee482edacecb4224b4245ee8db2ba0c7f..44166003d4ef15f12b73ee71bff7f2fadcd9181e 100644 (file)
@@ -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;