diff options
author | nate <nate@FreeBSD.org> | 1996-03-18 23:30:14 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1996-03-18 23:30:14 +0000 |
commit | 2a6c56cfef8c9cc143e0d0edc2007100e6c919eb (patch) | |
tree | 621c699255d73c3d22e1c7f4a6cf4a98d3f4d782 /sys/i386/apm/apm.c | |
parent | f80020a36d34beeb78d7d0ec4bcdb8cd73c85f26 (diff) | |
download | FreeBSD-src-2a6c56cfef8c9cc143e0d0edc2007100e6c919eb.zip FreeBSD-src-2a6c56cfef8c9cc143e0d0edc2007100e6c919eb.tar.gz |
Minor bugfixes from the recent PC-CARD release.
Submitted by: hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads
Diffstat (limited to 'sys/i386/apm/apm.c')
-rw-r--r-- | sys/i386/apm/apm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index 084ef8d..56ef020 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -13,7 +13,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.30 1996/03/18 22:40:57 nate Exp $ + * $Id: apm.c,v 1.31 1996/03/18 22:47:16 nate Exp $ */ #include "apm.h" @@ -539,7 +539,9 @@ apm_timeout(void *arg) struct apm_softc *sc = arg; apm_processevent(sc); - timeout(apm_timeout, (void *)sc, hz - 1 ); /* More than 1 Hz */ + if (sc->active == 1) { + timeout(apm_timeout, (void *)sc, hz - 1 ); /* More than 1 Hz */ + } } /* enable APM BIOS */ @@ -825,7 +827,11 @@ apmioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) #endif switch (cmd) { case APMIO_SUSPEND: - apm_suspend(); + if ( sc->active) { + apm_suspend(); + } else { + error = EINVAL; + } break; case APMIO_GETINFO: if (apm_get_info(sc, (apm_info_t)addr)) { |