svn commit: r184563 - head/sys/dev/acpica

Warner Losh imp at FreeBSD.org
Sun Nov 2 09:35:15 PST 2008


Author: imp
Date: Sun Nov  2 17:35:15 2008
New Revision: 184563
URL: http://svn.freebsd.org/changeset/base/184563

Log:
  Make the no driver stuff an ifdef.

Modified:
  head/sys/dev/acpica/acpi.c

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Sun Nov  2 17:04:54 2008	(r184562)
+++ head/sys/dev/acpica/acpi.c	Sun Nov  2 17:35:15 2008	(r184563)
@@ -789,8 +789,9 @@ acpi_print_child(device_t bus, device_t 
 static void
 acpi_probe_nomatch(device_t bus, device_t child)
 {
-
-    /* pci_set_powerstate(child, PCI_POWERSTATE_D3); */
+#ifdef ACPI_ENABLE_POWERDOWN_NODRIVER
+    pci_set_powerstate(child, PCI_POWERSTATE_D3);
+#endif
 }
 
 /*
@@ -810,9 +811,13 @@ acpi_driver_added(device_t dev, driver_t
     for (i = 0; i < numdevs; i++) {
 	child = devlist[i];
 	if (device_get_state(child) == DS_NOTPRESENT) {
-	    /* pci_set_powerstate(child, PCI_POWERSTATE_D0); */
+#ifdef ACPI_ENABLE_POWERDOWN_NODRIVER
+	    pci_set_powerstate(child, PCI_POWERSTATE_D0);
 	    if (device_probe_and_attach(child) != 0)
-		; /* pci_set_powerstate(child, PCI_POWERSTATE_D3); */
+		pci_set_powerstate(child, PCI_POWERSTATE_D3);
+#else
+	    device_probe_and_attach(child);
+#endif
 	}
     }
     free(devlist, M_TEMP);


More information about the svn-src-all mailing list