| 91 | } |
| 92 | |
| 93 | static int devfn_alloc(PCIBus *b) |
| 94 | { |
| 95 | int devfn; |
| 96 | for(devfn = 0; devfn < 256; devfn += 8) { |
| 97 | if (!b->device[devfn]) |
| 98 | return devfn; |
| 99 | } |
| 100 | return -1; |
| 101 | } |
| 102 | |
| 103 | /* devfn < 0 means to allocate it */ |
| 104 | PCIDevice *pci_register_device(PCIBus *b, const char *name, int devfn, |
no outgoing calls
no test coverage detected