Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Initialize battery capacity sensor value before...
details: https://anonhg.NetBSD.org/src/rev/80e213cae952
branches: trunk
changeset: 766331:80e213cae952
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Jun 20 20:24:59 2011 +0000
description:
Initialize battery capacity sensor value before registering.
diffstat:
sys/dev/acpi/acpi_bat.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 8cbc0f6d996f -r 80e213cae952 sys/dev/acpi/acpi_bat.c
--- a/sys/dev/acpi/acpi_bat.c Mon Jun 20 20:24:28 2011 +0000
+++ b/sys/dev/acpi/acpi_bat.c Mon Jun 20 20:24:59 2011 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index