summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpiac.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-12-23 17:46:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-12-23 17:46:40 +0000
commit456453067d1414c6f4097d6aeaf996624183d72b (patch)
treeb3a5f4f9a05a1aba0dd603c6eb3a6ff0cd86ee9f /sys/dev/acpi/acpiac.c
parent2da4a587cf08c4fd33f160fe0f40ff89d9d3a3c3 (diff)
adapt to new two-level sensor api; Constantine A. Murenin
Diffstat (limited to 'sys/dev/acpi/acpiac.c')
-rw-r--r--sys/dev/acpi/acpiac.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/acpi/acpiac.c b/sys/dev/acpi/acpiac.c
index 8b37c7fbbcc..b9f3ff7b7b8 100644
--- a/sys/dev/acpi/acpiac.c
+++ b/sys/dev/acpi/acpiac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiac.c,v 1.12 2006/12/21 11:23:41 deraadt Exp $ */
+/* $OpenBSD: acpiac.c,v 1.13 2006/12/23 17:46:39 deraadt Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -80,10 +80,12 @@ acpiac_attach(struct device *parent, struct device *self, void *aux)
else
printf(" in unknown state");
- strlcpy(sc->sens[0].device, DEVNAME(sc), sizeof(sc->sens[0].device));
- strlcpy(sc->sens[0].desc, "power supply", sizeof(sc->sens[2].desc));
+ strlcpy(sc->sc_sensdev.xname, DEVNAME(sc),
+ sizeof(sc->sc_sensdev.xname));
+ strlcpy(sc->sens[0].desc, "power supply", sizeof(sc->sens[0].desc));
sc->sens[0].type = SENSOR_INDICATOR;
- sensor_add(&sc->sens[0]);
+ sensor_attach(&sc->sc_sensdev, &sc->sens[0]);
+ sensordev_install(&sc->sc_sensdev);
sc->sens[0].value = sc->sc_ac_stat;
}