]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/init.c
Import initial Darwin Support from Apple
[pciutils.git] / lib / init.c
index be45f81dd5888a99038767bb8e773a59d5503568..04d8638a64ce7569c742d7d8067c13ce0de7b3ff 100644 (file)
@@ -57,6 +57,11 @@ static struct pci_methods *pci_methods[PCI_ACCESS_MAX] = {
 #else
   NULL,
 #endif
+#ifdef PCI_HAVE_PM_DARWIN_DEVICE
+  &pm_darwin_device,
+#else
+  NULL,
+#endif
 };
 
 void *
@@ -158,7 +163,7 @@ pci_alloc(void)
   pci_define_param(a, "net.cache_name", "~/.pciids-cache", "Name of the ID cache file");
   a->id_lookup_mode = PCI_LOOKUP_CACHE;
 #endif
-  for(i=0; i<PCI_ACCESS_MAX; i++)
+  for (i=0; i<PCI_ACCESS_MAX; i++)
     if (pci_methods[i] && pci_methods[i]->config)
       pci_methods[i]->config(a);
   return a;
@@ -185,7 +190,7 @@ pci_init(struct pci_access *a)
   else
     {
       unsigned int i;
-      for(i=0; i<PCI_ACCESS_MAX; i++)
+      for (i=0; i<PCI_ACCESS_MAX; i++)
        if (pci_methods[i])
          {
            a->debug("Trying method %d...", i);
@@ -210,7 +215,7 @@ pci_cleanup(struct pci_access *a)
 {
   struct pci_dev *d, *e;
 
-  for(d=a->devices; d; d=e)
+  for (d=a->devices; d; d=e)
     {
       e = d->next;
       pci_free_dev(d);