summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpibtn.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-04-12 12:49:29 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-04-12 12:49:29 +0000
commit55b7ceed0ca2cd9984cd3d2a58ae84439a3510f0 (patch)
treeda79f888feb519f98c27a7c3424b4c9266827293 /sys/dev/acpi/acpibtn.c
parent93de1ab6042ecbf745ff778bc42998c0ef836f5e (diff)
Get rid of acpi_s5 global variables; simply send SIGUSR2 instead of SUGUSR1
to tell init(8) to power down the machine. ok krw@
Diffstat (limited to 'sys/dev/acpi/acpibtn.c')
-rw-r--r--sys/dev/acpi/acpibtn.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/acpi/acpibtn.c b/sys/dev/acpi/acpibtn.c
index b47cb8b12e9..8d7ae2fdd42 100644
--- a/sys/dev/acpi/acpibtn.c
+++ b/sys/dev/acpi/acpibtn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibtn.c,v 1.15 2006/12/26 23:58:08 marco Exp $ */
+/* $OpenBSD: acpibtn.c,v 1.16 2008/04/12 12:49:28 kettenis Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -118,7 +118,6 @@ int
acpibtn_notify(struct aml_node *node, int notify_type, void *arg)
{
struct acpibtn_softc *sc = arg;
- extern int acpi_s5;
dnprintf(10, "acpibtn_notify: %.2x %s\n", notify_type,
sc->sc_devnode->parent->name);
@@ -128,10 +127,8 @@ acpibtn_notify(struct aml_node *node, int notify_type, void *arg)
case ACPIBTN_SLEEP:
break;
case ACPIBTN_POWER:
- if (notify_type == 0x80) {
- acpi_s5 = 1;
- psignal(initproc, SIGUSR1);
- }
+ if (notify_type == 0x80)
+ psignal(initproc, SIGUSR2);
break;
default:
printf("%s: spurious acpi button interrupt %i\n", DEVNAME(sc),