summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2002-08-22 19:47:10 +0000
committermux <mux@FreeBSD.org>2002-08-22 19:47:10 +0000
commitd2a32276a1fca883135ff6b36220a77c1a0fd558 (patch)
tree2c4c3f8d7e6a7f630098693eb8d01d75d017b708
parentf0066b5536a74e5efa89e27f9bcf02829d0eb988 (diff)
downloadFreeBSD-src-d2a32276a1fca883135ff6b36220a77c1a0fd558.zip
FreeBSD-src-d2a32276a1fca883135ff6b36220a77c1a0fd558.tar.gz
Convert NEXUS_ACCESSOR to use the __BUS_ACCESSOR
macro instead of reimplementing it. Approved by: peter
-rw-r--r--sys/ia64/include/nexusvar.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/ia64/include/nexusvar.h b/sys/ia64/include/nexusvar.h
index c9dcf1c..be38f33 100644
--- a/sys/ia64/include/nexusvar.h
+++ b/sys/ia64/include/nexusvar.h
@@ -33,20 +33,8 @@ enum nexus_device_ivars {
NEXUS_IVAR_PCIBUS
};
-#define NEXUS_ACCESSOR(A, B, T) \
- \
-static __inline T nexus_get_ ## A(device_t dev) \
-{ \
- uintptr_t v; \
- BUS_READ_IVAR(device_get_parent(dev), dev, NEXUS_IVAR_ ## B, &v); \
- return (T) v; \
-} \
- \
-static __inline void nexus_set_ ## A(device_t dev, T t) \
-{ \
- uintptr_t v = (uintptr_t) t; \
- BUS_WRITE_IVAR(device_get_parent(dev), dev, NEXUS_IVAR_ ## B, v); \
-}
+#define NEXUS_ACCESSOR(var, ivar, type) \
+ __BUS_ACCESSOR(nexus, var, NEXUS, ivar, type)
NEXUS_ACCESSOR(pcibus, PCIBUS, u_int32_t)
OpenPOWER on IntegriCloud