summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2007-04-26 18:12:14 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2007-04-26 18:12:14 +0000
commit555f0d9db9126e0a47145f4439843a19ddf093d0 (patch)
tree50710aff2eb5e85ff9110468940f90f24c305bd5 /sys/arch
parentb2451c3498ddb2e06384202a22e677b6e89704fa (diff)
ack the power switch interrupt even if machdep.kbdreset is not set
from Matthew R. Dempsky
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/landisk/dev/power.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/landisk/dev/power.c b/sys/arch/landisk/dev/power.c
index 7df1b11363d..4e1ad37ff1f 100644
--- a/sys/arch/landisk/dev/power.c
+++ b/sys/arch/landisk/dev/power.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: power.c,v 1.2 2007/03/23 21:27:37 miod Exp $ */
+/* $OpenBSD: power.c,v 1.3 2007/04/26 18:12:13 martin Exp $ */
/*
* Copyright (c) 2007 Martin Reindl.
@@ -96,14 +96,16 @@ power_intr(void *arg)
}
status = ~status;
- if ((status & BTN_POWER_BIT) && (kbd_reset == 1)) {
+ if (status & BTN_POWER_BIT) {
#ifdef DEBUG
printf("%s switched\n", sc->sc_dev.dv_xname);
Debugger();
#endif
- kbd_reset = 0;
_reg_write_1(LANDISK_PWRSW_INTCLR, 1);
- psignal(initproc, SIGUSR1);
+ if (kbd_reset == 1) {
+ kbd_reset = 0;
+ psignal(initproc, SIGUSR1);
+ }
return (1);
}
return (0);