summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Knudsen <mk@cvs.openbsd.org>2007-01-27 11:30:53 +0000
committerMichael Knudsen <mk@cvs.openbsd.org>2007-01-27 11:30:53 +0000
commit4cd81e70224c6dc62334405ad951e4f451eb8e32 (patch)
treef59ad1ad5666fc0457666bc4d597287f04ba6950 /sys/dev
parent4b77bad359774a8c65d1776a3f558f17572b8299 (diff)
Delay status report during attach until after invoking _DCK.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpidock.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/acpi/acpidock.c b/sys/dev/acpi/acpidock.c
index 07fe2cdebb2..b1903a837e3 100644
--- a/sys/dev/acpi/acpidock.c
+++ b/sys/dev/acpi/acpidock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpidock.c,v 1.8 2007/01/27 01:26:27 mk Exp $ */
+/* $OpenBSD: acpidock.c,v 1.9 2007/01/27 11:30:52 mk Exp $ */
/*
* Copyright (c) 2006,2007 Michael Knudsen <mk@openbsd.org>
*
@@ -79,18 +79,20 @@ acpidock_attach(struct device *parent, struct device *self, void *aux)
if (!acpidock_init(sc)) {
printf(": couldn't initialize\n");
return;
- } else
- printf(": docked (%d)\n", sc->sc_sta);
+ }
acpidock_docklock(sc, 1);
acpidock_dockctl(sc, 1);
} else {
- printf(": not docked (%d)\n", sc->sc_sta);
-
acpidock_dockctl(sc, 0);
acpidock_docklock(sc, 0);
}
+ acpidock_status(sc);
+ printf(":%s docked (%d)\n",
+ sc->sc_docked == ACPIDOCK_STATUS_DOCKED ? "" : " not",
+ sc->sc_sta);
+
strlcpy(sc->sc_sensdev.xname, DEVNAME(sc),
sizeof(sc->sc_sensdev.xname));
strlcpy(sc->sc_sens[0].desc, "docking station",