diff options
author | tmm <tmm@FreeBSD.org> | 2001-12-21 21:49:57 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2001-12-21 21:49:57 +0000 |
commit | fe2f3a4e09e1db7afd528deaf26ef80c71e27ad7 (patch) | |
tree | 02cd36993f4b8348653e8837c86459d3c6f87d4a /sys/dev/pci/pcivar.h | |
parent | c923af5389b5d85b4b6260f2468260c67a7d7799 (diff) | |
download | FreeBSD-src-fe2f3a4e09e1db7afd528deaf26ef80c71e27ad7.zip FreeBSD-src-fe2f3a4e09e1db7afd528deaf26ef80c71e27ad7.tar.gz |
Use the new resource_list_print_type() function to print resource list
contents, and the new __BUS_ACCESSOR macro to construct the accessor
functions.
Diffstat (limited to 'sys/dev/pci/pcivar.h')
-rw-r--r-- | sys/dev/pci/pcivar.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 5014d31..3fc06c7 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -182,20 +182,8 @@ enum pci_device_ivars { /* * Simplified accessors for pci devices */ -#define PCI_ACCESSOR(A, B, T) \ - \ -static __inline T pci_get_ ## A(device_t dev) \ -{ \ - uintptr_t v; \ - BUS_READ_IVAR(device_get_parent(dev), dev, PCI_IVAR_ ## B, &v); \ - return (T) v; \ -} \ - \ -static __inline void pci_set_ ## A(device_t dev, T t) \ -{ \ - uintptr_t v = (uintptr_t) t; \ - BUS_WRITE_IVAR(device_get_parent(dev), dev, PCI_IVAR_ ## B, v); \ -} +#define PCI_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(pci, var, PCI, ivar, type) PCI_ACCESSOR(subvendor, SUBVENDOR, u_int16_t) PCI_ACCESSOR(subdevice, SUBDEVICE, u_int16_t) |