Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/dev Do the same thing sparc64 does and redefi...



details:   https://anonhg.NetBSD.org/src/rev/cb4f84e72ea9
branches:  trunk
changeset: 573674:cb4f84e72ea9
user:      jmc <jmc%NetBSD.org@localhost>
date:      Fri Feb 04 22:20:55 2005 +0000

description:
Do the same thing sparc64 does and redefine sbus_promaddr_to_handle to a static
inline'd function. This way prototypes for it still work in the master
dev/sbusvar.h header. Found when the recent de-_P'ing occured

diffstat:

 sys/arch/sparc/dev/sbusvar.h |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r 7fff564efa9d -r cb4f84e72ea9 sys/arch/sparc/dev/sbusvar.h
--- a/sys/arch/sparc/dev/sbusvar.h      Fri Feb 04 22:03:53 2005 +0000
+++ b/sys/arch/sparc/dev/sbusvar.h      Fri Feb 04 22:20:55 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sbusvar.h,v 1.14 2003/08/07 16:29:36 agc Exp $ */
+/*     $NetBSD: sbusvar.h,v 1.15 2005/02/04 22:20:55 jmc Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -97,9 +97,12 @@
 /*
  * Macro to convert a PROM virtual address to a bus_space_handle_t.
  */
-#define        sbus_promaddr_to_handle(tag, promaddr, hp)      \
-       do {                                            \
-               *(hp) = (bus_space_handle_t)(promaddr); \
-       } while (0)
+#define        sbus_promaddr_to_handle(tag, promaddr, hp) sparc_promaddr_to_handle(tag, promaddr, hp)
+
+static __inline void
+sparc_promaddr_to_handle(bus_space_tag_t tag, u_int promaddr, bus_space_handle_t *hp)
+{
+       *(hp) = (bus_space_handle_t)(promaddr);
+}
 
 #endif /* _SBUS_VAR_SPARC_H */



Home | Main Index | Thread Index | Old Index