Changeset f9fbb333 in rtems for cpukit/libpci/pci_cfg_auto.c


Ignore:
Timestamp:
Aug 30, 2017, 9:01:38 AM (22 months ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
master
Children:
2e1d595
Parents:
0b134aca
git-author:
Daniel Hellstrom <daniel@…> (08/30/17 09:01:38)
git-committer:
Daniel Hellstrom <daniel@…> (09/29/17 11:36:44)
Message:

libpci: fix pci device allocation

The refactoring of pci_dev_create() was incorrect since the code relied on
different defines before including pci/cfg.h. This reverts back to the
original code having two pci_dev_create() one in auto and one in read library.
confdefs.h selectes between the two libraries so both there is no link
conflict.

Updates #3029

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libpci/pci_cfg_auto.c

    r0b134aca rf9fbb333  
    267267}
    268268#endif
     269
     270static struct pci_dev *pci_dev_create(int isbus)
     271{
     272        void *ptr;
     273        int size;
     274
     275        if (isbus)
     276                size = sizeof(struct pci_bus);
     277        else
     278                size = sizeof(struct pci_dev);
     279
     280        ptr = calloc(1, size);
     281        if (!ptr)
     282                rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
     283        return ptr;
     284}
    269285
    270286static void pci_find_devs(struct pci_bus *bus)
Note: See TracChangeset for help on using the changeset viewer.