summaryrefslogtreecommitdiffstats
path: root/sys/i386/bios
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-03-13 05:56:48 +0000
committerpeter <peter@FreeBSD.org>2001-03-13 05:56:48 +0000
commit9a4f9ead36389b3d59ae1fe26f08459a2c42e41b (patch)
treea725d8141313db4977ad0ce23f8e125296e51fdc /sys/i386/bios
parent7223692dd3fa691597893c7dec4bfceb0f174ec3 (diff)
downloadFreeBSD-src-9a4f9ead36389b3d59ae1fe26f08459a2c42e41b.zip
FreeBSD-src-9a4f9ead36389b3d59ae1fe26f08459a2c42e41b.tar.gz
Commit some tweaks I have had laying around my tree for over a year now.
Always set the APM "device" description. Some minor style tweaks.
Diffstat (limited to 'sys/i386/bios')
-rw-r--r--sys/i386/bios/apm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c
index adf26f0..26a8d06 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;
}
OpenPOWER on IntegriCloud