diff options
author | Michael Knudsen <mk@cvs.openbsd.org> | 2007-04-23 17:38:31 +0000 |
---|---|---|
committer | Michael Knudsen <mk@cvs.openbsd.org> | 2007-04-23 17:38:31 +0000 |
commit | 79dcf85777a2b6cfec5fae27fe96c7144b3010b0 (patch) | |
tree | a745007e89e52aeef2816510860a2f577a15a27a /sys | |
parent | 950db5fde12b6262c40526587a5afb3c8205df87 (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.h | 4 | ||||
-rw-r--r-- | sys/dev/acpi/acpidock.c | 26 |
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"); |