Date: Sat, 17 Jan 2009 17:40:45 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r187368 - head/sys/dev/acpica Message-ID: <200901171740.n0HHejIS048675@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901171740.n0HHejIS048675>