tc1100-wmi: Fix state reporting
authorKrzysztof Kosiński <tweenk.pl@gmail.com>
Thu, 19 Mar 2009 22:22:31 +0000 (23:22 +0100)
committerLen Brown <len.brown@intel.com>
Fri, 3 Apr 2009 16:03:27 +0000 (12:03 -0400)
commit07de5bdb7bad607e29dc17c345717403a76a334c
tree944d7898e8fb41ce2f30836d64264f1572ebbc1b
parenta59d1637eb0e0a37ee0e5c92800c60abe3624e24
tc1100-wmi: Fix state reporting

The tc1100-wmi driver should print the current states of wireless LAN and
jogdial brightness control when "cat /sys/devices/platform/tc1100-wmi/wireless"
and "cat /sys/devices/platform/tc1100-wmi/jogdial" are executed, respectively.
What actually happens is that both of those commands print 0 regardless of the
hardware state. The cause is that wmi_query_block returns an ACPI_TYPE_INTEGER
rather than ACPI_TYPE_BUFFER as the driver assumes. Additionally, the driver
intends to return a jogdial state that is inverted with respect to the commands
required to set it (e.g. it intends to return 1 after the jogdial file was
written with 0).

This patch fixes both of those issues - the commands to query the
state now work, and should return the same state that was written.

http://bugzilla.kernel.org/show_bug.cgi?id=12286

Signed-off-by: Krzysztof Kosiński <tweenk.pl@gmail.com>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/tc1100-wmi.c