Changeset f4bf22c in rtems for cpukit/libpci/pci_cfg_read.c


Ignore:
Timestamp:
Apr 8, 2015, 8:51:45 AM (5 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
1b645c3
Parents:
1f4f1e2e
git-author:
Daniel Hellstrom <daniel@…> (04/08/15 08:51:45)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:28)
Message:

LIBPCI: new implementation private header file

  • new implementation private header file
  • moved double implementation of pci_dev_create used by read & auto cfg libraries to common pci_dev_create.c
  • moved declaration of pci_bus_cnt to private header file so avoid extern in .c files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libpci/pci_cfg_read.c

    r1f4f1e2e rf4bf22c  
    1414#include <pci/cfg.h>
    1515#include <pci/access.h>
     16
     17#include "pci_internal.h"
    1618
    1719/* PCI Library
     
    3234#endif
    3335
    34 /* Number of buses */
    35 extern int pci_bus_cnt;
    36 
    3736/* The Host Bridge bus is initialized here */
    3837extern struct pci_bus pci_hb;
    39 
    40 static struct pci_dev *pci_dev_create(int isbus)
    41 {
    42         void *ptr;
    43         int size;
    44 
    45         if (isbus)
    46                 size = sizeof(struct pci_bus);
    47         else
    48                 size = sizeof(struct pci_dev);
    49 
    50         ptr = malloc(size);
    51         if (!ptr)
    52                 rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
    53         memset(ptr, 0, size);
    54         return ptr;
    55 }
    5638
    5739/* Check if address is accessible from host */
Note: See TracChangeset for help on using the changeset viewer.