diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpi/acpidock.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sys/dev/acpi/acpidock.c b/sys/dev/acpi/acpidock.c index 173cd8859a5..f9c09e1c409 100644 --- a/sys/dev/acpi/acpidock.c +++ b/sys/dev/acpi/acpidock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpidock.c,v 1.6 2007/01/25 21:45:42 mk Exp $ */ +/* $OpenBSD: acpidock.c,v 1.7 2007/01/27 01:21:14 mk Exp $ */ /* * Copyright (c) 2006,2007 Michael Knudsen <mk@openbsd.org> * @@ -74,22 +74,19 @@ acpidock_attach(struct device *parent, struct device *self, void *aux) printf(": %s", sc->sc_devnode->parent->name); - sc->sc_docked = ACPIDOCK_STATUS_UNKNOWN; - - if (!acpidock_init(sc)) { - printf(": couldn't initialize\n"); - return; - } - acpidock_status(sc); - printf(": %s (%d)\n", - sc->sc_docked == ACPIDOCK_STATUS_DOCKED ? "docked" : "undocked", - sc->sc_sta); - if (sc->sc_docked == ACPIDOCK_STATUS_DOCKED) { + 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); } |