Minor bugfixes from the recent PC-CARD release.

Submitted by:	hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads
This commit is contained in:
Nate Williams 1996-03-18 23:30:14 +00:00
parent ff910f3507
commit c5952f03fc
2 changed files with 18 additions and 6 deletions

View File

@ -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)) {

View File

@ -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)) {