diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-08-05 21:10:11 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-08-05 21:10:11 +0000 |
commit | 0cc0395cb94b162a229a1e65d3e983d1caac8e29 (patch) | |
tree | 4c9081b38135afce8180fed145cf129efde8504e /sys/dev/acpi | |
parent | a9368e40d779aa514284ed1d60e4293893045eea (diff) |
new i386/amd64 machdep.lidsuspend sysctl which decides whether a lid
close causes a suspend. resumes are not tied to this; they happen
unconditionally. this is a temporary knob for the 4.8 release; afterwards
it will move to a more convenient place
much moaning discussing where to put the knob with kettenis
tested by various including phessler
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/acpibtn.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/acpi/acpibtn.c b/sys/dev/acpi/acpibtn.c index 739c3a134e5..278e296cd4f 100644 --- a/sys/dev/acpi/acpibtn.c +++ b/sys/dev/acpi/acpibtn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpibtn.c,v 1.30 2010/08/05 20:11:32 deraadt Exp $ */ +/* $OpenBSD: acpibtn.c,v 1.31 2010/08/05 21:10:06 deraadt Exp $ */ /* * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> * @@ -120,14 +120,12 @@ acpibtn_getsta(struct acpibtn_softc *sc) return (0); } -/* XXX tie this to a sysctl later */ -int acpi_lid_suspend = 0; - int acpibtn_notify(struct aml_node *node, int notify_type, void *arg) { struct acpibtn_softc *sc = arg; #ifndef SMALL_KERNEL + extern int lid_suspend; int64_t lid; #endif @@ -143,7 +141,7 @@ acpibtn_notify(struct aml_node *node, int notify_type, void *arg) * _LID method. 0 means the lid is closed and we * should go to sleep. */ - if (acpi_lid_suspend == 0) + if (lid_suspend == 0) break; if (aml_evalinteger(sc->sc_acpi, sc->sc_devnode, "_LID", 0, NULL, &lid)) |