summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Knudsen <mk@cvs.openbsd.org>2007-04-23 17:38:31 +0000
committerMichael Knudsen <mk@cvs.openbsd.org>2007-04-23 17:38:31 +0000
commit79dcf85777a2b6cfec5fae27fe96c7144b3010b0 (patch)
treea745007e89e52aeef2816510860a2f577a15a27a /sys
parent950db5fde12b6262c40526587a5afb3c8205df87 (diff)
In acpidock_softc, change sc_sens from being a one element long array to
simply being a single struct ksensor.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/acpidev.h4
-rw-r--r--sys/dev/acpi/acpidock.c26
2 files changed, 15 insertions, 15 deletions
diff --git a/sys/dev/acpi/acpidev.h b/sys/dev/acpi/acpidev.h
index 67d10fbe652..25c066b5d28 100644
--- a/sys/dev/acpi/acpidev.h
+++ b/sys/dev/acpi/acpidev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpidev.h,v 1.23 2007/04/22 21:05:29 mk Exp $ */
+/* $OpenBSD: acpidev.h,v 1.24 2007/04/23 17:38:30 mk Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
@@ -297,7 +297,7 @@ struct acpidock_softc {
TAILQ_HEAD(, aml_nodelist) sc_deps_h;
struct aml_nodelist *sc_deps;
- struct ksensor sc_sens[1];
+ struct ksensor sc_sens;
struct ksensordev sc_sensdev;
int sc_docked;
diff --git a/sys/dev/acpi/acpidock.c b/sys/dev/acpi/acpidock.c
index 935669bcaad..0d5d55a5852 100644
--- a/sys/dev/acpi/acpidock.c
+++ b/sys/dev/acpi/acpidock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpidock.c,v 1.22 2007/04/22 21:02:25 mk Exp $ */
+/* $OpenBSD: acpidock.c,v 1.23 2007/04/23 17:38:30 mk Exp $ */
/*
* Copyright (c) 2006,2007 Michael Knudsen <mk@openbsd.org>
*
@@ -98,15 +98,15 @@ acpidock_attach(struct device *parent, struct device *self, void *aux)
strlcpy(sc->sc_sensdev.xname, DEVNAME(sc),
sizeof(sc->sc_sensdev.xname));
if (sc->sc_docked)
- strlcpy(sc->sc_sens[0].desc, "docked",
- sizeof(sc->sc_sens[0].desc));
+ strlcpy(sc->sc_sens.desc, "docked",
+ sizeof(sc->sc_sens.desc));
else
- strlcpy(sc->sc_sens[0].desc, "not docked",
- sizeof(sc->sc_sens[0].desc));
+ strlcpy(sc->sc_sens.desc, "not docked",
+ sizeof(sc->sc_sens.desc));
- sc->sc_sens[0].type = SENSOR_INDICATOR;
- sc->sc_sens[0].value = sc->sc_docked == ACPIDOCK_STATUS_DOCKED;
- sensor_attach(&sc->sc_sensdev, &sc->sc_sens[0]);
+ sc->sc_sens.type = SENSOR_INDICATOR;
+ sc->sc_sens.value = sc->sc_docked == ACPIDOCK_STATUS_DOCKED;
+ sensor_attach(&sc->sc_sensdev, &sc->sc_sens);
sensordev_install(&sc->sc_sensdev);
TAILQ_INIT(&sc->sc_deps_h);
@@ -246,13 +246,13 @@ acpidock_notify(struct aml_node *node, int notify_type, void *arg)
}
acpidock_status(sc);
- sc->sc_sens[0].value = sc->sc_docked == ACPIDOCK_STATUS_DOCKED;
+ sc->sc_sens.value = sc->sc_docked == ACPIDOCK_STATUS_DOCKED;
if (sc->sc_docked)
- strlcpy(sc->sc_sens[0].desc, "docked",
- sizeof(sc->sc_sens[0].desc));
+ strlcpy(sc->sc_sens.desc, "docked",
+ sizeof(sc->sc_sens.desc));
else
- strlcpy(sc->sc_sens[0].desc, "not docked",
- sizeof(sc->sc_sens[0].desc));
+ strlcpy(sc->sc_sens.desc, "not docked",
+ sizeof(sc->sc_sens.desc));
printf(": status %s\n",
sc->sc_docked == ACPIDOCK_STATUS_DOCKED ? "docked" : "undocked");