svn commit: r187950 - in stable/7/sys: . contrib/pf dev/acpica
dev/ath/ath_hal dev/cxgb
Alexander Motin
mav at FreeBSD.org
Sat Jan 31 04:26:07 PST 2009
Author: mav
Date: Sat Jan 31 12:26:06 2009
New Revision: 187950
URL: http://svn.freebsd.org/changeset/base/187950
Log:
MFC rev. 187368
Convert battery capacity/rate from mA to mW only when summary is requested.
Unconditional conversion causes incorrect rate units reported by acpiconf.
Modified:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/dev/acpica/acpi_battery.c
stable/7/sys/dev/ath/ath_hal/ (props changed)
stable/7/sys/dev/cxgb/ (props changed)
Modified: stable/7/sys/dev/acpica/acpi_battery.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_battery.c Sat Jan 31 12:24:53 2009 (r187949)
+++ stable/7/sys/dev/acpica/acpi_battery.c Sat Jan 31 12:26:06 2009 (r187950)
@@ -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-stable-7
mailing list