@@ -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;
@@ -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;
@@ -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;