Module Name: src Committed By: pgoyette Date: Mon Jun 20 20:25:00 UTC 2011
Modified Files: src/sys/dev/acpi: acpi_bat.c Log Message: Initialize battery capacity sensor value before registering. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/acpi/acpi_bat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/acpi/acpi_bat.c diff -u src/sys/dev/acpi/acpi_bat.c:1.109 src/sys/dev/acpi/acpi_bat.c:1.110 --- src/sys/dev/acpi/acpi_bat.c:1.109 Wed Feb 16 09:05:12 2011 +++ src/sys/dev/acpi/acpi_bat.c Mon Jun 20 20:24:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.109 2011/02/16 09:05:12 jruoho Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.110 2011/06/20 20:24:59 pgoyette Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.109 2011/02/16 09:05:12 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.110 2011/06/20 20:24:59 pgoyette Exp $"); #include <sys/param.h> #include <sys/condvar.h> @@ -729,6 +729,9 @@ #undef INITDATA + sc->sc_sensor[ACPIBAT_CHARGE_STATE].value_cur = + ENVSYS_BATTERY_CAPACITY_NORMAL; + sc->sc_sensor[ACPIBAT_CAPACITY].flags |= ENVSYS_FPERCENT | ENVSYS_FVALID_MAX | ENVSYS_FMONLIMITS;