acpi_thinkpad(4): make acpi_thinkpad sensors actually work
authorConstantine A. Murenin <cnst+dfly@bugmail.mojo.ru>
Thu, 18 Feb 2010 07:13:00 +0000 (02:13 -0500)
committerConstantine A. Murenin <cnst+dfly@bugmail.mojo.ru>
Thu, 18 Feb 2010 07:49:45 +0000 (02:49 -0500)
commit20b3fbb5f22fcbc17e90863f7363a7918c04cbd2
tree254757d3b7c10603784238431ea46558eb2169fd
parent363194c841927fea3e5744b794f4421d9b639e4d
acpi_thinkpad(4): make acpi_thinkpad sensors actually work

* After this patch on my ThinkPad R51:
  %sysctl hw.sensors.acpi_ibm0
  hw.sensors.acpi_ibm0.temp0: 69.00 degC
  hw.sensors.acpi_ibm0.temp1: 52.00 degC
  hw.sensors.acpi_ibm0.temp2: 41.00 degC
  hw.sensors.acpi_ibm0.temp3: 59.00 degC
  hw.sensors.acpi_ibm0.temp4: 36.00 degC
  hw.sensors.acpi_ibm0.temp5: invalid
  hw.sensors.acpi_ibm0.temp6: 26.00 degC
  hw.sensors.acpi_ibm0.temp7: invalid
  hw.sensors.acpi_ibm0.fan0: 3469 RPM

* Before this patch:
  o The temperature values were absolutely random, since
    the /data/ variable was never initialised from temp[i].
  o The braces were missing from the fan error path of
    an if statement.
  o Whitespaces were used instead of tabs.
sys/dev/acpica5/acpi_thinkpad/acpi_thinkpad.c