diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2001-03-13 05:56:48 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2001-03-13 05:56:48 +0000 |
| commit | 02846353f96532797feef46c2a28b2eb32f03dcd (patch) | |
| tree | 2c66fc6f34b7c159f38d233d2e01e9888d462b9e | |
| parent | e793f3a0e001353a2f6f6078e561f495d38fdf21 (diff) | |
Notes
| -rw-r--r-- | sys/i386/apm/apm.c | 13 | ||||
| -rw-r--r-- | sys/i386/bios/apm.c | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index adf26f0fc3cc..26a8d0634abe 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -691,7 +691,7 @@ apm_timeout(void *dummy) if (sc->active == 1) /* Run slightly more oftan than 1 Hz */ - apm_timeout_ch = timeout(apm_timeout, NULL, hz - 1 ); + apm_timeout_ch = timeout(apm_timeout, NULL, hz - 1); } /* enable APM BIOS */ @@ -766,13 +766,14 @@ apm_probe(device_t dev) struct apm_softc *sc = &apm_softc; int disabled, flags; - if (resource_int_value("apm", 0, "disabled", &disabled) == 0 - && disabled != 0) - return ENXIO; - device_set_desc(dev, "APM BIOS"); - if ( device_get_unit(dev) > 0 ) { + if (resource_int_value("apm", 0, "disabled", &disabled) != 0) + disabled = 0; + if (disabled) + return ENXIO; + + if (device_get_unit(dev) > 0) { printf("apm: Only one APM driver supported.\n"); return ENXIO; } diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index adf26f0fc3cc..26a8d0634abe 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -691,7 +691,7 @@ apm_timeout(void *dummy) if (sc->active == 1) /* Run slightly more oftan than 1 Hz */ - apm_timeout_ch = timeout(apm_timeout, NULL, hz - 1 ); + apm_timeout_ch = timeout(apm_timeout, NULL, hz - 1); } /* enable APM BIOS */ @@ -766,13 +766,14 @@ apm_probe(device_t dev) struct apm_softc *sc = &apm_softc; int disabled, flags; - if (resource_int_value("apm", 0, "disabled", &disabled) == 0 - && disabled != 0) - return ENXIO; - device_set_desc(dev, "APM BIOS"); - if ( device_get_unit(dev) > 0 ) { + if (resource_int_value("apm", 0, "disabled", &disabled) != 0) + disabled = 0; + if (disabled) + return ENXIO; + + if (device_get_unit(dev) > 0) { printf("apm: Only one APM driver supported.\n"); return ENXIO; } |
