Mon Aug 1 08:36:39 2011 UTC ()
use device_private().  thanks to jmcneill for pointing this out.


(mrg)
diff -r1.1 -r1.2 src/sys/arch/sparc64/dev/central.c
diff -r1.1 -r1.2 src/sys/arch/sparc64/dev/fhc_central.c
diff -r1.1 -r1.2 src/sys/arch/sparc64/dev/fhc_mainbus.c

cvs diff -r1.1 -r1.2 src/sys/arch/sparc64/dev/central.c (expand / switch to context diff)
--- src/sys/arch/sparc64/dev/central.c 2011/07/29 08:37:36 1.1
+++ src/sys/arch/sparc64/dev/central.c 2011/08/01 08:36:39 1.2
@@ -1,4 +1,4 @@
-/*	$NetBSD: central.c,v 1.1 2011/07/29 08:37:36 mrg Exp $	*/
+/*	$NetBSD: central.c,v 1.2 2011/08/01 08:36:39 mrg Exp $	*/
 /*	$OpenBSD: central.c,v 1.7 2010/11/11 17:58:23 miod Exp $	*/
 
 /*
@@ -80,7 +80,7 @@
 static void
 central_attach(device_t parent, device_t self, void *aux)
 {
-	struct central_softc *sc = (struct central_softc *)self;
+	struct central_softc *sc = device_private(self);
 	struct mainbus_attach_args *ma = aux;
 	int node0, node;
 

cvs diff -r1.1 -r1.2 src/sys/arch/sparc64/dev/fhc_central.c (expand / switch to context diff)
--- src/sys/arch/sparc64/dev/fhc_central.c 2011/07/29 08:37:36 1.1
+++ src/sys/arch/sparc64/dev/fhc_central.c 2011/08/01 08:36:39 1.2
@@ -1,4 +1,4 @@
-/*	$NetBSD: fhc_central.c,v 1.1 2011/07/29 08:37:36 mrg Exp $	*/
+/*	$NetBSD: fhc_central.c,v 1.2 2011/08/01 08:36:39 mrg Exp $	*/
 /*	$OpenBSD: fhc_central.c,v 1.5 2004/09/27 18:32:35 jason Exp $	*/
 
 /*
@@ -61,7 +61,7 @@
 void
 fhc_central_attach(device_t parent, device_t self, void *aux)
 {
-	struct fhc_softc *sc = (struct fhc_softc *)self;
+	struct fhc_softc *sc = device_private(self);
 	struct central_attach_args *ca = aux;
 	u_int32_t board;
 

cvs diff -r1.1 -r1.2 src/sys/arch/sparc64/dev/fhc_mainbus.c (expand / switch to context diff)
--- src/sys/arch/sparc64/dev/fhc_mainbus.c 2011/07/29 08:37:36 1.1
+++ src/sys/arch/sparc64/dev/fhc_mainbus.c 2011/08/01 08:36:39 1.2
@@ -1,4 +1,4 @@
-/*	$NetBSD: fhc_mainbus.c,v 1.1 2011/07/29 08:37:36 mrg Exp $	*/
+/*	$NetBSD: fhc_mainbus.c,v 1.2 2011/08/01 08:36:39 mrg Exp $	*/
 /*	$OpenBSD: fhc_mainbus.c,v 1.4 2004/09/27 18:32:35 jason Exp $	*/
 
 /*
@@ -59,7 +59,7 @@
 void
 fhc_mainbus_attach(device_t parent, device_t self, void *aux)
 {
-	struct fhc_softc *sc = (struct fhc_softc *)self;
+	struct fhc_softc *sc = device_private(self);
 	struct mainbus_attach_args *ma = aux;
 
 	sc->sc_node = ma->ma_node;