Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91669
b: refs/heads/master
c: 7030892
h: refs/heads/master
i:
  91667: de90bf9
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Apr 21, 2008
1 parent da2136d commit 266912b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ba6ab11d8fbd8d29afec4e39236e1255ae0339a
refs/heads/master: 70308923d317f2ad4973c30d90bb48ae38761317
17 changes: 14 additions & 3 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,27 @@ EXPORT_SYMBOL(pci_root_buses);

LIST_HEAD(pci_devices);


static int find_anything(struct device *dev, void *data)
{
return 1;
}

/*
* Some device drivers need know if pci is initiated.
* Basically, we think pci is not initiated when there
* is no device in list of pci_devices.
* is no device to be found on the pci_bus_type.
*/
int no_pci_devices(void)
{
return list_empty(&pci_devices);
}
struct device *dev;
int no_devices;

dev = bus_find_device(&pci_bus_type, NULL, NULL, find_anything);
no_devices = (dev == NULL);
put_device(dev);
return no_devices;
}
EXPORT_SYMBOL(no_pci_devices);

#ifdef HAVE_PCI_LEGACY
Expand Down

0 comments on commit 266912b

Please sign in to comment.