Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jan 2009 12:26:06 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r187950 - in stable/7/sys: . contrib/pf dev/acpica dev/ath/ath_hal dev/cxgb
Message-ID:  <200901311226.n0VCQ6nZ024318@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901311226.n0VCQ6nZ024318>