Don't attempt to register PCI devices on systems that don't have PCI. Fixes warnings on startup.
This commit is contained in:
parent
0d36eeaabe
commit
77a969f9cc
1 changed files with 4 additions and 1 deletions
|
|
@ -207,7 +207,10 @@ void pci_add_specific(int card, uint8_t (*read)(int func, int addr, void *priv),
|
|||
int pci_add(uint8_t (*read)(int func, int addr, void *priv), void (*write)(int func, int addr, uint8_t val, void *priv), void *priv)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
if (!PCI)
|
||||
return -1;
|
||||
|
||||
for (c = 0; c < 32; c++)
|
||||
{
|
||||
if (pci_card_valid[c] && !pci_card_read[c] && !pci_card_write[c])
|
||||
|
|
|
|||
Loading…
Reference in a new issue