From owner-svn-src-head@FreeBSD.ORG Thu Nov 12 18:16:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 927D7106566B; Thu, 12 Nov 2009 18:16:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8198F8FC18; Thu, 12 Nov 2009 18:16:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nACIGZDZ038426; Thu, 12 Nov 2009 18:16:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nACIGZrM038423; Thu, 12 Nov 2009 18:16:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200911121816.nACIGZrM038423@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 12 Nov 2009 18:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199230 - in head/sys/dev: dpms fb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 18:16:35 -0000 Author: jkim Date: Thu Nov 12 18:16:35 2009 New Revision: 199230 URL: http://svn.freebsd.org/changeset/base/199230 Log: - Remove a redundant check for dpms(4). - Test a cheaper function first. Modified: head/sys/dev/dpms/dpms.c head/sys/dev/fb/vesa.c Modified: head/sys/dev/dpms/dpms.c ============================================================================== --- head/sys/dev/dpms/dpms.c Thu Nov 12 17:56:56 2009 (r199229) +++ head/sys/dev/dpms/dpms.c Thu Nov 12 18:16:35 2009 (r199230) @@ -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); } Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Thu Nov 12 17:56:56 2009 (r199229) +++ head/sys/dev/fb/vesa.c Thu Nov 12 18:16:35 2009 (r199230) @@ -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;