Module Name:    src
Committed By:   mrg
Date:           Mon Aug  1 08:36:39 UTC 2011

Modified Files:
        src/sys/arch/sparc64/dev: central.c fhc_central.c fhc_mainbus.c

Log Message:
use device_private().  thanks to jmcneill for pointing this out.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/dev/central.c \
    src/sys/arch/sparc64/dev/fhc_central.c \
    src/sys/arch/sparc64/dev/fhc_mainbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/dev/central.c
diff -u src/sys/arch/sparc64/dev/central.c:1.1 src/sys/arch/sparc64/dev/central.c:1.2
--- src/sys/arch/sparc64/dev/central.c:1.1	Fri Jul 29 08:37:36 2011
+++ src/sys/arch/sparc64/dev/central.c	Mon Aug  1 08:36:39 2011
@@ -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;
 
Index: src/sys/arch/sparc64/dev/fhc_central.c
diff -u src/sys/arch/sparc64/dev/fhc_central.c:1.1 src/sys/arch/sparc64/dev/fhc_central.c:1.2
--- src/sys/arch/sparc64/dev/fhc_central.c:1.1	Fri Jul 29 08:37:36 2011
+++ src/sys/arch/sparc64/dev/fhc_central.c	Mon Aug  1 08:36:39 2011
@@ -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;
 
Index: src/sys/arch/sparc64/dev/fhc_mainbus.c
diff -u src/sys/arch/sparc64/dev/fhc_mainbus.c:1.1 src/sys/arch/sparc64/dev/fhc_mainbus.c:1.2
--- src/sys/arch/sparc64/dev/fhc_mainbus.c:1.1	Fri Jul 29 08:37:36 2011
+++ src/sys/arch/sparc64/dev/fhc_mainbus.c	Mon Aug  1 08:36:39 2011
@@ -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;

Reply via email to