svn commit: r187368 - head/sys/dev/acpica
Alexander Motin
mav at FreeBSD.org
Sat Jan 17 09:40:45 PST 2009
Author: mav
Date: Sat Jan 17 17:40:44 2009
New Revision: 187368
URL: http://svn.freebsd.org/changeset/base/187368
Log:
Convert battery capacity/rate from mA to mW only when summary is requested.
Unconditional conversion causes incorrect rate units reported by acpiconf.
MFC after: 2 weeks
Modified:
head/sys/dev/acpica/acpi_battery.c
Modified: head/sys/dev/acpica/acpi_battery.c
==============================================================================
--- head/sys/dev/acpica/acpi_battery.c Sat Jan 17 16:37:13 2009 (r187367)
+++ head/sys/dev/acpica/acpi_battery.c Sat Jan 17 17:40:44 2009 (r187368)
@@ -197,7 +197,7 @@ acpi_battery_get_battinfo(device_t dev,
* is 0 (due to some error reading the battery), skip this
* conversion.
*/
- if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0) {
+ if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0 && dev == NULL) {
bst[i].rate = (bst[i].rate * bif->dvol) / 1000;
bst[i].cap = (bst[i].cap * bif->dvol) / 1000;
bif->lfcap = (bif->lfcap * bif->dvol) / 1000;
More information about the svn-src-head
mailing list