Changeset a2e0e6e in rtems for cpukit/libpci


Ignore:
Timestamp:
Feb 27, 2015, 3:44:48 PM (4 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
358b8543
Parents:
65d1f35
git-author:
Daniel Hellstrom <daniel@…> (02/27/15 15:44:48)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:26)
Message:

LIBPCI: fixed RES2DEV in pci/cfg.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libpci/pci/cfg.h

    r65d1f35 ra2e0e6e  
    147147};
    148148
    149 /* Get Device from resource pointer */
     149/* Get Device from resource pointer. bar is the index of the pci_dev.resources
     150 * array and used to get the device base address of which the resource is
     151 * associated with.
     152 */
    150153#define RES2DEV(res) ((struct pci_dev *) \
    151                         ((void *)res - (res->bar * (sizeof(struct pci_res)))))
     154        ((uintptr_t)res - (uintptr_t)(res->bar * (sizeof(struct pci_res)))))
    152155
    153156/* Device flags */
Note: See TracChangeset for help on using the changeset viewer.