diff options
author | jkim <jkim@FreeBSD.org> | 2009-11-12 18:16:35 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2009-11-12 18:16:35 +0000 |
commit | 2f448a4a2a88e26012aba2a9ddf375e1a9f2eed1 (patch) | |
tree | 34b93de1b198bb7cc78a8051cb1c803d4ab3d926 | |
parent | 1aa17d213da2c1227225a1f624b8cefc8ff318dd (diff) | |
download | FreeBSD-src-2f448a4a2a88e26012aba2a9ddf375e1a9f2eed1.zip FreeBSD-src-2f448a4a2a88e26012aba2a9ddf375e1a9f2eed1.tar.gz |
- Remove a redundant check for dpms(4).
- Test a cheaper function first.
-rw-r--r-- | sys/dev/dpms/dpms.c | 8 | ||||
-rw-r--r-- | sys/dev/fb/vesa.c | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/dpms/dpms.c b/sys/dev/dpms/dpms.c index 7e097c5..60aafc6 100644 --- a/sys/dev/dpms/dpms.c +++ b/sys/dev/dpms/dpms.c @@ -125,12 +125,8 @@ static void dpms_identify(driver_t *driver, device_t parent) { - /* The DPMS VBE only allows for manipulating a single monitor. */ - if (devclass_get_device(dpms_devclass, 0) != NULL) - return; - - if (x86bios_match_device(0xc0000, parent) && - device_get_flags(parent) != 0) + if (device_get_flags(parent) != 0 && + x86bios_match_device(0xc0000, parent)) device_add_child(parent, "dpms", 0); } diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c index 36b05f8..13f03f7 100644 --- a/sys/dev/fb/vesa.c +++ b/sys/dev/fb/vesa.c @@ -250,8 +250,8 @@ vesa_bios_post(void) dc = devclass_find("vgapci"); if (dc != NULL && devclass_get_devices(dc, &devs, &count) == 0) { for (dev = NULL, i = 0; dev == NULL && i < count; devs++, i++) - if (x86bios_match_device(0xc0000, *devs) && - device_get_flags(*devs) != 0) { + if (device_get_flags(*devs) != 0 && + x86bios_match_device(0xc0000, *devs)) { dev = *devs; is_pci = 1; break; |