diff options
| author | Maxime Henrion <mux@FreeBSD.org> | 2002-08-19 22:50:08 +0000 |
|---|---|---|
| committer | Maxime Henrion <mux@FreeBSD.org> | 2002-08-19 22:50:08 +0000 |
| commit | e9cf2ddb50c0fee80ee31509612a1d32a5e3676c (patch) | |
| tree | eb6290fb7e17f5dae78e4cbea42b55f345fd3dcf /sys/dev | |
| parent | 57788f25b331bddaca7086d7c788be9749386cf3 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -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 e77a02663c72..6c30615aef75 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -226,20 +226,8 @@ enum pcib_device_ivars { PCIB_IVAR_BUS }; -#define PCIB_ACCESSOR(A, B, T) \ - \ -static __inline T pcib_get_ ## A(device_t dev) \ -{ \ - uintptr_t v; \ - BUS_READ_IVAR(device_get_parent(dev), dev, PCIB_IVAR_ ## B, &v); \ - return (T) v; \ -} \ - \ -static __inline void pcib_set_ ## A(device_t dev, T t) \ -{ \ - uintptr_t v = (uintptr_t) t; \ - BUS_WRITE_IVAR(device_get_parent(dev), dev, PCIB_IVAR_ ## B, v); \ -} +#define PCIB_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(pcib, var, PCIB, ivar, type) PCIB_ACCESSOR(bus, BUS, u_int32_t) |
