diff options
author | 2014-04-13 06:32:41 +0000 | |
---|---|---|
committer | 2014-04-13 06:32:41 +0000 | |
commit | 34e64ca610179cee1e5da45862682819ce220c0d (patch) | |
tree | a26afe32cd66207bc665bf3c2703e29cf809af83 | |
parent | remove a 'RCSId[]' which was missed in the rcsid[] removal from 2009. (diff) | |
download | wireguard-openbsd-34e64ca610179cee1e5da45862682819ce220c0d.tar.xz wireguard-openbsd-34e64ca610179cee1e5da45862682819ce220c0d.zip |
perform the same ACPITZ_INIT operation as attach does, at DVACT_WAKEUP
time also. Let's commit this idea since it is sound, and keep an eye
for reports.
discussed months ago with kettenis and mlarkin
-rw-r--r-- | sys/dev/acpi/acpitz.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpitz.c b/sys/dev/acpi/acpitz.c index 970631540e3..e9455b28ae6 100644 --- a/sys/dev/acpi/acpitz.c +++ b/sys/dev/acpi/acpitz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpitz.c,v 1.44 2012/10/31 16:35:36 deraadt Exp $ */ +/* $OpenBSD: acpitz.c,v 1.45 2014/04/13 06:32:41 deraadt Exp $ */ /* * Copyright (c) 2006 Can Erkin Acar <canacar@openbsd.org> * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> @@ -65,9 +65,11 @@ struct acpitz_softc { int acpitz_match(struct device *, void *, void *); void acpitz_attach(struct device *, struct device *, void *); +int acpitz_activate(struct device *, int); struct cfattach acpitz_ca = { - sizeof(struct acpitz_softc), acpitz_match, acpitz_attach + sizeof(struct acpitz_softc), acpitz_match, acpitz_attach, + NULL, acpitz_activate }; struct cfdriver acpitz_cd = { @@ -237,6 +239,19 @@ acpitz_attach(struct device *parent, struct device *self, void *aux) } int +acpitz_activate(struct device *self, int act) +{ + struct acpitz_softc *sc = (struct acpitz_softc *)self; + + switch (act) { + case DVACT_WAKEUP: + acpitz_init(sc, ACPITZ_INIT); + break; + } + return 0; +} + +int acpitz_setfan(struct acpitz_softc *sc, int i, char *method) { struct aml_node *node; |