diff options
Diffstat (limited to 'cpukit/libpci/pci_cfg_read.c')
-rw-r--r-- | cpukit/libpci/pci_cfg_read.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/libpci/pci_cfg_read.c b/cpukit/libpci/pci_cfg_read.c index 16c2928bab..07837431b0 100644 --- a/cpukit/libpci/pci_cfg_read.c +++ b/cpukit/libpci/pci_cfg_read.c @@ -36,6 +36,22 @@ /* The Host Bridge bus is initialized here */ extern struct pci_bus pci_hb; +static struct pci_dev *pci_dev_create(int isbus) +{ + void *ptr; + int size; + + if (isbus) + size = sizeof(struct pci_bus); + else + size = sizeof(struct pci_dev); + + ptr = calloc(1, size); + if (!ptr) + rtems_fatal_error_occurred(RTEMS_NO_MEMORY); + return ptr; +} + /* Check if address is accessible from host */ static int pci_read_addressable(struct pci_dev *dev, struct pci_res *res) { |