summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2006-03-29 06:51:47 +0000
committerthorpej <thorpej@NetBSD.org>2006-03-29 06:51:47 +0000
commit838ee1e0d90129e856db3a99e09d4bb40c541b6d (patch)
treeda9d09ba9c553a626341fe8ab4c8efdb86242ec4 /sys/dev
parent8fc35725733521389e5dd87c986097a7c24e0de8 (diff)
Use device_private().
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isapnp/aha_isapnp.c6
-rw-r--r--sys/dev/isapnp/aic_isapnp.c6
-rw-r--r--sys/dev/isapnp/atppc_isapnp.c8
-rw-r--r--sys/dev/isapnp/com_isapnp.c6
-rw-r--r--sys/dev/isapnp/ess_isapnp.c6
-rw-r--r--sys/dev/isapnp/gus_isapnp.c6
-rw-r--r--sys/dev/isapnp/i82365_isapnp.c8
-rw-r--r--sys/dev/isapnp/if_an_isapnp.c6
-rw-r--r--sys/dev/isapnp/if_cs_isapnp.c6
-rw-r--r--sys/dev/isapnp/if_ep_isapnp.c6
-rw-r--r--sys/dev/isapnp/if_fmv_isapnp.c6
-rw-r--r--sys/dev/isapnp/if_le_isapnp.c6
-rw-r--r--sys/dev/isapnp/if_ne_isapnp.c6
-rw-r--r--sys/dev/isapnp/if_tr_isapnp.c6
-rw-r--r--sys/dev/isapnp/isapnp.c8
-rw-r--r--sys/dev/isapnp/isic_isapnp.c4
-rw-r--r--sys/dev/isapnp/joy_isapnp.c6
-rw-r--r--sys/dev/isapnp/mpu_isapnp.c6
-rw-r--r--sys/dev/isapnp/sb_isapnp.c6
-rw-r--r--sys/dev/isapnp/wdc_isapnp.c6
-rw-r--r--sys/dev/isapnp/wss_isapnp.c6
-rw-r--r--sys/dev/isapnp/ym_isapnp.c6
-rw-r--r--sys/dev/marvell/gti2c.c10
-rw-r--r--sys/dev/marvell/gtidma.c8
-rw-r--r--sys/dev/marvell/gtmpsc.c10
-rw-r--r--sys/dev/marvell/gtpci.c10
-rw-r--r--sys/dev/marvell/if_gfe.c10
-rw-r--r--sys/dev/marvell/obio.c8
-rw-r--r--sys/dev/mca/aha_mca.c6
-rw-r--r--sys/dev/mca/com_mca.c6
-rw-r--r--sys/dev/mca/ed_mca.c8
-rw-r--r--sys/dev/mca/edc_mca.c6
-rw-r--r--sys/dev/mca/esp_mca.c6
-rw-r--r--sys/dev/mca/if_ate_mca.c6
-rw-r--r--sys/dev/mca/if_elmc_mca.c6
-rw-r--r--sys/dev/mca/if_ep_mca.c6
-rw-r--r--sys/dev/mca/if_le_mca.c6
-rw-r--r--sys/dev/mca/if_ne_mca.c6
-rw-r--r--sys/dev/mca/if_tr_mca.c6
-rw-r--r--sys/dev/mca/if_tra_mca.c6
-rw-r--r--sys/dev/mca/if_we_mca.c6
-rw-r--r--sys/dev/mii/acphy.c6
-rw-r--r--sys/dev/mii/amhphy.c6
-rw-r--r--sys/dev/mii/bmtphy.c6
-rw-r--r--sys/dev/mii/brgphy.c6
-rw-r--r--sys/dev/mii/ciphy.c6
-rw-r--r--sys/dev/mii/dmphy.c6
-rw-r--r--sys/dev/mii/exphy.c6
-rw-r--r--sys/dev/mii/gentbi.c6
-rw-r--r--sys/dev/mii/glxtphy.c6
-rw-r--r--sys/dev/mii/icsphy.c6
-rw-r--r--sys/dev/mii/igphy.c6
-rw-r--r--sys/dev/mii/inphy.c6
-rw-r--r--sys/dev/mii/iophy.c6
-rw-r--r--sys/dev/mii/lxtphy.c6
-rw-r--r--sys/dev/mii/makphy.c6
-rw-r--r--sys/dev/mii/mii_physubr.c6
-rw-r--r--sys/dev/mii/nsphy.c6
-rw-r--r--sys/dev/mii/pnaphy.c6
-rw-r--r--sys/dev/mii/qsphy.c6
-rw-r--r--sys/dev/mii/rgephy.c6
-rw-r--r--sys/dev/mii/rlphy.c6
-rw-r--r--sys/dev/mii/sqphy.c6
-rw-r--r--sys/dev/mii/tlphy.c10
-rw-r--r--sys/dev/mii/tqphy.c6
-rw-r--r--sys/dev/mii/ukphy.c6
-rw-r--r--sys/dev/mii/urlphy.c6
-rw-r--r--sys/dev/mscp/mscp_disk.c6
-rw-r--r--sys/dev/mscp/mscp_subr.c6
-rw-r--r--sys/dev/mscp/mscp_tape.c6
-rw-r--r--sys/dev/mvme/clmpcc_pcctwo.c6
-rw-r--r--sys/dev/mvme/clock_pcctwo.c6
-rw-r--r--sys/dev/mvme/if_ie_mvme.c8
-rw-r--r--sys/dev/mvme/lpt_pcctwo.c6
-rw-r--r--sys/dev/mvme/osiop_pcctwo.c6
-rw-r--r--sys/dev/ofisa/atppc_ofisa.c8
-rw-r--r--sys/dev/ofisa/com_ofisa.c6
-rw-r--r--sys/dev/ofisa/ess_ofisa.c6
-rw-r--r--sys/dev/ofisa/if_cs_ofisa.c6
-rw-r--r--sys/dev/ofisa/joy_ofisa.c6
-rw-r--r--sys/dev/ofisa/lpt_ofisa.c6
-rw-r--r--sys/dev/ofisa/pckbc_ofisa.c6
-rw-r--r--sys/dev/ofisa/sb_ofisa.c6
-rw-r--r--sys/dev/ofisa/wdc_ofisa.c6
-rw-r--r--sys/dev/ofw/ofcons.c6
-rw-r--r--sys/dev/ofw/ofdisk.c6
-rw-r--r--sys/dev/ofw/ofnet.c6
-rw-r--r--sys/dev/ofw/ofrtc.c6
-rw-r--r--sys/dev/pckbport/pckbd.c6
-rw-r--r--sys/dev/pckbport/pms.c6
-rw-r--r--sys/dev/podulebus/acemidi.c8
-rw-r--r--sys/dev/podulebus/dtide.c6
-rw-r--r--sys/dev/podulebus/hcide.c6
-rw-r--r--sys/dev/podulebus/hcsc.c6
-rw-r--r--sys/dev/podulebus/if_ea.c6
-rw-r--r--sys/dev/podulebus/if_eb.c6
-rw-r--r--sys/dev/podulebus/if_ei.c6
-rw-r--r--sys/dev/podulebus/oak.c6
98 files changed, 312 insertions, 312 deletions
diff --git a/sys/dev/isapnp/aha_isapnp.c b/sys/dev/isapnp/aha_isapnp.c
index 2f7bbb069fd..eb994c2d7d9 100644
--- a/sys/dev/isapnp/aha_isapnp.c
+++ b/sys/dev/isapnp/aha_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aha_isapnp.c,v 1.9 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: aha_isapnp.c,v 1.10 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aha_isapnp.c,v 1.9 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aha_isapnp.c,v 1.10 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -85,7 +85,7 @@ aha_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct aha_softc *sc = (void *)self;
+ struct aha_softc *sc = device_private(self);
struct aha_probe_data apd;
struct isapnp_attach_args *ipa = aux;
diff --git a/sys/dev/isapnp/aic_isapnp.c b/sys/dev/isapnp/aic_isapnp.c
index 42e0d6663d3..88b4ac959ba 100644
--- a/sys/dev/isapnp/aic_isapnp.c
+++ b/sys/dev/isapnp/aic_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aic_isapnp.c,v 1.11 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: aic_isapnp.c,v 1.12 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic_isapnp.c,v 1.11 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic_isapnp.c,v 1.12 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -89,7 +89,7 @@ aic_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct aic_isapnp_softc *isc = (void *)self;
+ struct aic_isapnp_softc *isc = device_private(self);
struct aic_softc *sc = &isc->sc_aic;
struct isapnp_attach_args *ipa = aux;
diff --git a/sys/dev/isapnp/atppc_isapnp.c b/sys/dev/isapnp/atppc_isapnp.c
index eab586b83cb..31fd9427d0d 100644
--- a/sys/dev/isapnp/atppc_isapnp.c
+++ b/sys/dev/isapnp/atppc_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: atppc_isapnp.c,v 1.4 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: atppc_isapnp.c,v 1.5 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atppc_isapnp.c,v 1.4 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atppc_isapnp.c,v 1.5 2006/03/29 06:51:47 thorpej Exp $");
#include "opt_atppc.h"
@@ -100,8 +100,8 @@ atppc_isapnp_match(struct device *parent, struct cfdata *match, void *aux)
static void
atppc_isapnp_attach(struct device *parent, struct device *self, void *aux)
{
- struct atppc_softc *sc = (struct atppc_softc *) self;
- struct atppc_isapnp_softc *asc = (struct atppc_isapnp_softc *)self;
+ struct atppc_softc *sc = device_private(self);
+ struct atppc_isapnp_softc *asc = device_private(self);
struct isapnp_attach_args *ipa = aux;
sc->sc_dev_ok = ATPPC_NOATTACH;
diff --git a/sys/dev/isapnp/com_isapnp.c b/sys/dev/isapnp/com_isapnp.c
index d74f13b292a..c7e16996d52 100644
--- a/sys/dev/isapnp/com_isapnp.c
+++ b/sys/dev/isapnp/com_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com_isapnp.c,v 1.22 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: com_isapnp.c,v 1.23 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_isapnp.c,v 1.22 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_isapnp.c,v 1.23 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -91,7 +91,7 @@ com_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct com_isapnp_softc *isc = (void *)self;
+ struct com_isapnp_softc *isc = device_private(self);
struct com_softc *sc = &isc->sc_com;
struct isapnp_attach_args *ipa = aux;
diff --git a/sys/dev/isapnp/ess_isapnp.c b/sys/dev/isapnp/ess_isapnp.c
index 607d2551f5a..8e67f5f7556 100644
--- a/sys/dev/isapnp/ess_isapnp.c
+++ b/sys/dev/isapnp/ess_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ess_isapnp.c,v 1.13 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: ess_isapnp.c,v 1.14 2006/03/29 06:51:47 thorpej Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ess_isapnp.c,v 1.13 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ess_isapnp.c,v 1.14 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -96,7 +96,7 @@ ess_isapnp_attach(struct device *parent, struct device *self, void *aux)
struct ess_softc *sc;
struct isapnp_attach_args *ipa;
- sc = (struct ess_softc *)self;
+ sc = device_private(self);
ipa = aux;
printf("\n");
diff --git a/sys/dev/isapnp/gus_isapnp.c b/sys/dev/isapnp/gus_isapnp.c
index f9a13d6d886..f6694e0c510 100644
--- a/sys/dev/isapnp/gus_isapnp.c
+++ b/sys/dev/isapnp/gus_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gus_isapnp.c,v 1.25 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: gus_isapnp.c,v 1.26 2006/03/29 06:51:47 thorpej Exp $ */
/*
* Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gus_isapnp.c,v 1.25 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gus_isapnp.c,v 1.26 2006/03/29 06:51:47 thorpej Exp $");
#include "guspnp.h"
#if NGUSPNP > 0
@@ -145,7 +145,7 @@ gus_isapnp_attach(struct device *parent, struct device *self, void *aux)
struct iw_softc *sc;
struct isapnp_attach_args *ipa;
- sc = (struct iw_softc *)self;
+ sc = device_private(self);
ipa = aux;
printf("\n");
diff --git a/sys/dev/isapnp/i82365_isapnp.c b/sys/dev/isapnp/i82365_isapnp.c
index b8589cabfc8..f2a925c2819 100644
--- a/sys/dev/isapnp/i82365_isapnp.c
+++ b/sys/dev/isapnp/i82365_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: i82365_isapnp.c,v 1.19 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: i82365_isapnp.c,v 1.20 2006/03/29 06:51:47 thorpej Exp $ */
/*
* Copyright (c) 1998 Bill Sommerfeld. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82365_isapnp.c,v 1.19 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82365_isapnp.c,v 1.20 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -109,8 +109,8 @@ pcic_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct pcic_softc *sc = (void *) self;
- struct pcic_isa_softc *isc = (void *) self;
+ struct pcic_softc *sc = device_private(self);
+ struct pcic_isa_softc *isc = device_private(self);
struct isapnp_attach_args *ipa = aux;
isa_chipset_tag_t ic = ipa->ipa_ic;
bus_space_tag_t iot = ipa->ipa_iot;
diff --git a/sys/dev/isapnp/if_an_isapnp.c b/sys/dev/isapnp/if_an_isapnp.c
index 9da86fea6dc..d2ff83bedfe 100644
--- a/sys/dev/isapnp/if_an_isapnp.c
+++ b/sys/dev/isapnp/if_an_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_an_isapnp.c,v 1.11 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: if_an_isapnp.c,v 1.12 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_an_isapnp.c,v 1.11 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_an_isapnp.c,v 1.12 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -103,7 +103,7 @@ an_isapnp_match(struct device *parent, struct cfdata *match, void *aux)
void
an_isapnp_attach(struct device *parent, struct device *self, void *aux)
{
- struct an_isapnp_softc *isc = (void *) self;
+ struct an_isapnp_softc *isc = device_private(self);
struct an_softc *sc = &isc->sc_an;
struct isapnp_attach_args *ipa = aux;
diff --git a/sys/dev/isapnp/if_cs_isapnp.c b/sys/dev/isapnp/if_cs_isapnp.c
index dca759444ef..2cf6b934705 100644
--- a/sys/dev/isapnp/if_cs_isapnp.c
+++ b/sys/dev/isapnp/if_cs_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cs_isapnp.c,v 1.8 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: if_cs_isapnp.c,v 1.9 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c)2001 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cs_isapnp.c,v 1.8 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cs_isapnp.c,v 1.9 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -82,7 +82,7 @@ cs_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct cs_softc *sc = (void *)self;
+ struct cs_softc *sc = device_private(self);
struct isapnp_attach_args *ipa = aux;
#ifdef notyet
struct cs_softc_isa *isc = (void *)sc;
diff --git a/sys/dev/isapnp/if_ep_isapnp.c b/sys/dev/isapnp/if_ep_isapnp.c
index 3de4ad081c3..14fb92975fe 100644
--- a/sys/dev/isapnp/if_ep_isapnp.c
+++ b/sys/dev/isapnp/if_ep_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ep_isapnp.c,v 1.28 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: if_ep_isapnp.c,v 1.29 2006/03/29 06:51:47 thorpej Exp $ */
/*
* Copyright (c) 1997 Jonathan Stone <jonathan@NetBSD.org>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ep_isapnp.c,v 1.28 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ep_isapnp.c,v 1.29 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -88,7 +88,7 @@ ep_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct ep_softc *sc = (void *)self;
+ struct ep_softc *sc = device_private(self);
struct isapnp_attach_args *ipa = aux;
int chipset;
diff --git a/sys/dev/isapnp/if_fmv_isapnp.c b/sys/dev/isapnp/if_fmv_isapnp.c
index a9862794099..839cbae24e8 100644
--- a/sys/dev/isapnp/if_fmv_isapnp.c
+++ b/sys/dev/isapnp/if_fmv_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fmv_isapnp.c,v 1.5 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: if_fmv_isapnp.c,v 1.6 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fmv_isapnp.c,v 1.5 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fmv_isapnp.c,v 1.6 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -89,7 +89,7 @@ fmv_isapnp_match(struct device *parent, struct cfdata *match, void *aux)
void
fmv_isapnp_attach(struct device *parent, struct device *self, void *aux)
{
- struct fmv_isapnp_softc *isc = (struct fmv_isapnp_softc *)self;
+ struct fmv_isapnp_softc *isc = device_private(self);
struct mb86960_softc *sc = &isc->sc_mb86960;
struct isapnp_attach_args * const ipa = aux;
diff --git a/sys/dev/isapnp/if_le_isapnp.c b/sys/dev/isapnp/if_le_isapnp.c
index c955af96582..3fa6bb6fc3e 100644
--- a/sys/dev/isapnp/if_le_isapnp.c
+++ b/sys/dev/isapnp/if_le_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le_isapnp.c,v 1.27 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: if_le_isapnp.c,v 1.28 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_isapnp.c,v 1.27 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_isapnp.c,v 1.28 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -184,7 +184,7 @@ le_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct le_isapnp_softc *lesc = (struct le_isapnp_softc *)self;
+ struct le_isapnp_softc *lesc = device_private(self);
struct lance_softc *sc = &lesc->sc_am7990.lsc;
struct isapnp_attach_args *ipa = aux;
bus_space_tag_t iot;
diff --git a/sys/dev/isapnp/if_ne_isapnp.c b/sys/dev/isapnp/if_ne_isapnp.c
index 60fd7e3e713..b5ab97b43ef 100644
--- a/sys/dev/isapnp/if_ne_isapnp.c
+++ b/sys/dev/isapnp/if_ne_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ne_isapnp.c,v 1.20 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: if_ne_isapnp.c,v 1.21 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ne_isapnp.c,v 1.20 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ne_isapnp.c,v 1.21 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -106,7 +106,7 @@ ne_isapnp_attach(
struct device *self,
void *aux)
{
- struct ne_isapnp_softc * const isc = (struct ne_isapnp_softc *)self;
+ struct ne_isapnp_softc * const isc = device_private(self);
struct ne2000_softc * const nsc = &isc->sc_ne2000;
struct dp8390_softc * const dsc = &nsc->sc_dp8390;
struct isapnp_attach_args * const ipa = aux;
diff --git a/sys/dev/isapnp/if_tr_isapnp.c b/sys/dev/isapnp/if_tr_isapnp.c
index 973871fe84b..24b608f3b8c 100644
--- a/sys/dev/isapnp/if_tr_isapnp.c
+++ b/sys/dev/isapnp/if_tr_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tr_isapnp.c,v 1.12 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: if_tr_isapnp.c,v 1.13 2006/03/29 06:51:47 thorpej Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tr_isapnp.c,v 1.12 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tr_isapnp.c,v 1.13 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -94,7 +94,7 @@ tr_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct tr_softc *sc = (void *)self;
+ struct tr_softc *sc = device_private(self);
struct isapnp_attach_args *ipa = aux;
int mmioidx, sramidx;
diff --git a/sys/dev/isapnp/isapnp.c b/sys/dev/isapnp/isapnp.c
index d2b16d21dbd..4394af08f25 100644
--- a/sys/dev/isapnp/isapnp.c
+++ b/sys/dev/isapnp/isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isapnp.c,v 1.49 2005/12/24 20:27:41 perry Exp $ */
+/* $NetBSD: isapnp.c,v 1.50 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.49 2005/12/24 20:27:41 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.50 2006/03/29 06:51:47 thorpej Exp $");
#include "isadma.h"
@@ -942,7 +942,7 @@ isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct isapnp_softc *sc = (struct isapnp_softc *) self;
+ struct isapnp_softc *sc = device_private(self);
struct isa_attach_args *ia = aux;
sc->sc_iot = ia->ia_iot;
@@ -977,7 +977,7 @@ void
isapnp_callback(self)
struct device *self;
{
- struct isapnp_softc *sc = (struct isapnp_softc *)self;
+ struct isapnp_softc *sc = device_private(self);
struct isapnp_attach_args *ipa, *lpa;
int c, d;
diff --git a/sys/dev/isapnp/isic_isapnp.c b/sys/dev/isapnp/isic_isapnp.c
index 83ec0dced8d..8d2f7fdef32 100644
--- a/sys/dev/isapnp/isic_isapnp.c
+++ b/sys/dev/isapnp/isic_isapnp.c
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_isapnp.c,v 1.21 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_isapnp.c,v 1.22 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -230,7 +230,7 @@ isic_isapnp_attach(parent, self, aux)
"Unknown Version"
};
- struct isic_softc *sc = (void *)self;
+ struct isic_softc *sc = device_private(self);
struct isapnp_attach_args *ipa = aux;
const struct isic_isapnp_card_desc *desc = isic_isapnp_descriptions;
int i;
diff --git a/sys/dev/isapnp/joy_isapnp.c b/sys/dev/isapnp/joy_isapnp.c
index ca1d613df0c..b7e965f3612 100644
--- a/sys/dev/isapnp/joy_isapnp.c
+++ b/sys/dev/isapnp/joy_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: joy_isapnp.c,v 1.6 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: joy_isapnp.c,v 1.7 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: joy_isapnp.c,v 1.6 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy_isapnp.c,v 1.7 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -78,7 +78,7 @@ joy_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct joy_softc *sc = (struct joy_softc *)self;
+ struct joy_softc *sc = device_private(self);
struct isapnp_attach_args *ipa = aux;
bus_space_handle_t ioh;
diff --git a/sys/dev/isapnp/mpu_isapnp.c b/sys/dev/isapnp/mpu_isapnp.c
index 68fc8173dab..307979f45f2 100644
--- a/sys/dev/isapnp/mpu_isapnp.c
+++ b/sys/dev/isapnp/mpu_isapnp.c
@@ -1,7 +1,7 @@
-/* $NetBSD: mpu_isapnp.c,v 1.11 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: mpu_isapnp.c,v 1.12 2006/03/29 06:51:47 thorpej Exp $ */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpu_isapnp.c,v 1.11 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpu_isapnp.c,v 1.12 2006/03/29 06:51:47 thorpej Exp $");
#include "midi.h"
@@ -61,7 +61,7 @@ mpu_isapnp_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct mpu_isapnp_softc *sc = (struct mpu_isapnp_softc *)self;
+ struct mpu_isapnp_softc *sc = device_private(self);
struct isapnp_attach_args *ipa = aux;
printf("\n");
diff --git a/sys/dev/isapnp/sb_isapnp.c b/sys/dev/isapnp/sb_isapnp.c
index 2a6793fac8f..ebd405379c6 100644
--- a/sys/dev/isapnp/sb_isapnp.c
+++ b/sys/dev/isapnp/sb_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sb_isapnp.c,v 1.44 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: sb_isapnp.c,v 1.45 2006/03/29 06:51:47 thorpej Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c,v 1.44 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c,v 1.45 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -97,7 +97,7 @@ sb_isapnp_attach(struct device *parent, struct device *self, void *aux)
struct sbdsp_softc *sc;
struct isapnp_attach_args *ipa;
- sc = (struct sbdsp_softc *)self;
+ sc = device_private(self);
ipa = aux;
printf("\n");
diff --git a/sys/dev/isapnp/wdc_isapnp.c b/sys/dev/isapnp/wdc_isapnp.c
index 27196a8d055..8faa7c062d3 100644
--- a/sys/dev/isapnp/wdc_isapnp.c
+++ b/sys/dev/isapnp/wdc_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_isapnp.c,v 1.33 2006/01/16 20:30:19 bouyer Exp $ */
+/* $NetBSD: wdc_isapnp.c,v 1.34 2006/03/29 06:51:47 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.33 2006/01/16 20:30:19 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.34 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -95,7 +95,7 @@ wdc_isapnp_probe(struct device *parent, struct cfdata *match, void *aux)
static void
wdc_isapnp_attach(struct device *parent, struct device *self, void *aux)
{
- struct wdc_isapnp_softc *sc = (void *)self;
+ struct wdc_isapnp_softc *sc = device_private(self);
struct wdc_regs *wdr;
struct isapnp_attach_args *ipa = aux;
int i;
diff --git a/sys/dev/isapnp/wss_isapnp.c b/sys/dev/isapnp/wss_isapnp.c
index 70094912d0d..98b883a7f65 100644
--- a/sys/dev/isapnp/wss_isapnp.c
+++ b/sys/dev/isapnp/wss_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wss_isapnp.c,v 1.17 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: wss_isapnp.c,v 1.18 2006/03/29 06:51:47 thorpej Exp $ */
/*
* Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wss_isapnp.c,v 1.17 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wss_isapnp.c,v 1.18 2006/03/29 06:51:47 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,7 +98,7 @@ wss_isapnp_attach(struct device *parent, struct device *self, void *aux)
struct isapnp_attach_args *ipa;
int variant;
- sc = (struct wss_softc *)self;
+ sc = device_private(self);
ac = &sc->sc_ad1848.sc_ad1848;
ipa = aux;
printf("\n");
diff --git a/sys/dev/isapnp/ym_isapnp.c b/sys/dev/isapnp/ym_isapnp.c
index 05bd6e4f7b3..c80431a4194 100644
--- a/sys/dev/isapnp/ym_isapnp.c
+++ b/sys/dev/isapnp/ym_isapnp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ym_isapnp.c,v 1.18 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: ym_isapnp.c,v 1.19 2006/03/29 06:51:47 thorpej Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ym_isapnp.c,v 1.18 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ym_isapnp.c,v 1.19 2006/03/29 06:51:47 thorpej Exp $");
#include "mpu_ym.h"
@@ -106,7 +106,7 @@ ym_isapnp_attach(struct device *parent, struct device *self, void *aux)
struct ad1848_softc *ac;
struct isapnp_attach_args *ipa;
- sc = (struct ym_softc *)self;
+ sc = device_private(self);
ac = &sc->sc_ad1848.sc_ad1848;
ipa = aux;
printf("\n");
diff --git a/sys/dev/marvell/gti2c.c b/sys/dev/marvell/gti2c.c
index cca5eb521b2..a901ce8339b 100644
--- a/sys/dev/marvell/gti2c.c
+++ b/sys/dev/marvell/gti2c.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gti2c.c,v 1.3 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: gti2c.c,v 1.4 2006/03/29 06:55:32 thorpej Exp $ */
/*
* Copyright (c) 2005 Brocade Communcations, inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gti2c.c,v 1.3 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gti2c.c,v 1.4 2006/03/29 06:55:32 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -237,7 +237,7 @@ gt_i2c_intr(void *aux)
int
gt_i2c_match(struct device *parent, struct cfdata *cfdata, void *aux)
{
- struct gt_softc * const gt = (void *) parent;
+ struct gt_softc * const gt = device_private(parent);
struct gt_attach_args * const ga = aux;
return GT_I2COK(gt, ga, &gtiic_cd);
@@ -246,8 +246,8 @@ gt_i2c_match(struct device *parent, struct cfdata *cfdata, void *aux)
void
gt_i2c_attach(struct device *parent, struct device *self, void *aux)
{
- struct gt_softc * const gt = (void *) parent;
- struct gti2c_softc * const sc = (void *) self;
+ struct gt_softc * const gt = device_private(parent);
+ struct gti2c_softc * const sc = device_private(self);
struct gt_attach_args * const ga = aux;
struct i2cbus_attach_args iba;
diff --git a/sys/dev/marvell/gtidma.c b/sys/dev/marvell/gtidma.c
index 51132754a4d..fdbde1aab55 100644
--- a/sys/dev/marvell/gtidma.c
+++ b/sys/dev/marvell/gtidma.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gtidma.c,v 1.8 2005/12/24 23:00:49 perry Exp $ */
+/* $NetBSD: gtidma.c,v 1.9 2006/03/29 06:55:32 thorpej Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.8 2005/12/24 23:00:49 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.9 2006/03/29 06:55:32 thorpej Exp $");
#include "opt_idma.h"
#include "opt_ddb.h"
@@ -283,8 +283,8 @@ idma_attach(
struct device * const self,
void * const aux)
{
- struct gt_softc * const gtsc = (struct gt_softc *)parent;
- idma_softc_t * const sc = (idma_softc_t *)self;
+ struct gt_softc * const gtsc = device_private(parent);
+ idma_softc_t * const sc = device_private(self);
struct gt_attach_args * const ga = aux;
unsigned int i;
void *ih;
diff --git a/sys/dev/marvell/gtmpsc.c b/sys/dev/marvell/gtmpsc.c
index 4c8fdf61edd..3f131496b29 100644
--- a/sys/dev/marvell/gtmpsc.c
+++ b/sys/dev/marvell/gtmpsc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gtmpsc.c,v 1.15 2006/03/28 17:38:34 thorpej Exp $ */
+/* $NetBSD: gtmpsc.c,v 1.16 2006/03/29 06:55:32 thorpej Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.15 2006/03/28 17:38:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.16 2006/03/29 06:55:32 thorpej Exp $");
#include "opt_kgdb.h"
@@ -421,7 +421,7 @@ gtmpsc_loadchannelregs(struct gtmpsc_softc *sc)
STATIC int
gtmpscmatch(struct device *parent, struct cfdata *self, void *aux)
{
- struct gt_softc *gt = (struct gt_softc *) parent;
+ struct gt_softc *gt = device_private(parent);
struct gt_attach_args *ga = aux;
return GT_MPSCOK(gt, ga, &gtmpsc_cd);
@@ -431,8 +431,8 @@ STATIC void
gtmpscattach(struct device *parent, struct device *self, void *aux)
{
struct gt_attach_args *ga = aux;
- struct gt_softc *gt = (struct gt_softc *) parent;
- struct gtmpsc_softc *sc = (struct gtmpsc_softc *) self;
+ struct gt_softc *gt = device_private(parent);
+ struct gtmpsc_softc *sc = device_private(self);
gtmpsc_poll_sdma_t *vmps;
gtmpsc_poll_sdma_t *pmps;
struct tty *tp;
diff --git a/sys/dev/marvell/gtpci.c b/sys/dev/marvell/gtpci.c
index 13ba5151901..6abd73a4038 100644
--- a/sys/dev/marvell/gtpci.c
+++ b/sys/dev/marvell/gtpci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gtpci.c,v 1.13 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: gtpci.c,v 1.14 2006/03/29 06:55:32 thorpej Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.13 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.14 2006/03/29 06:55:32 thorpej Exp $");
#include "opt_marvell.h"
#include <sys/param.h>
@@ -197,7 +197,7 @@ static const struct pci_init {
int
gtpci_match(struct device *parent, struct cfdata *self, void *aux)
{
- struct gt_softc * const gt = (struct gt_softc *) parent;
+ struct gt_softc * const gt = device_private(parent);
struct gt_attach_args * const ga = aux;
return GT_PCIOK(gt, ga, &gtpci_cd);
@@ -221,8 +221,8 @@ gtpci_attach(struct device *parent, struct device *self, void *aux)
{
struct pcibus_attach_args pba;
struct gt_attach_args * const ga = aux;
- struct gt_softc * const gt = (struct gt_softc *) parent;
- struct gtpci_softc * const gtp = (struct gtpci_softc *) self;
+ struct gt_softc * const gt = device_private(parent);
+ struct gtpci_softc * const gtp = device_private(self);
struct gtpci_chipset * const gtpc = &gtp->gtpci_gtpc;
struct pci_chipset * const pc = &gtpc->gtpc_pc;
const int busno = ga->ga_unit;
diff --git a/sys/dev/marvell/if_gfe.c b/sys/dev/marvell/if_gfe.c
index 8eec73db723..bc3f2a6a4ad 100644
--- a/sys/dev/marvell/if_gfe.c
+++ b/sys/dev/marvell/if_gfe.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gfe.c,v 1.19 2006/03/29 04:16:50 thorpej Exp $ */
+/* $NetBSD: if_gfe.c,v 1.20 2006/03/29 06:55:32 thorpej Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.19 2006/03/29 04:16:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.20 2006/03/29 06:55:32 thorpej Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@@ -224,8 +224,8 @@ void
gfe_attach(struct device *parent, struct device *self, void *aux)
{
struct gt_attach_args * const ga = aux;
- struct gt_softc * const gt = (struct gt_softc *) parent;
- struct gfe_softc * const sc = (struct gfe_softc *) self;
+ struct gt_softc * const gt = device_private(parent);
+ struct gfe_softc * const sc = device_private(self);
struct ifnet * const ifp = &sc->sc_ec.ec_if;
uint32_t data;
uint8_t enaddr[6];
@@ -1521,7 +1521,7 @@ gfe_mii_write (struct device *self, int phy, int reg, int value)
void
gfe_mii_statchg (struct device *self)
{
- /* struct gfe_softc *sc = (struct gfe_softc *) self; */
+ /* struct gfe_softc *sc = device_private(self); */
/* do nothing? */
}
diff --git a/sys/dev/marvell/obio.c b/sys/dev/marvell/obio.c
index 2c6c5934b9f..bee8ddc5ffb 100644
--- a/sys/dev/marvell/obio.c
+++ b/sys/dev/marvell/obio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: obio.c,v 1.7 2005/12/11 12:22:16 christos Exp $ */
+/* $NetBSD: obio.c,v 1.8 2006/03/29 06:55:32 thorpej Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.7 2005/12/11 12:22:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.8 2006/03/29 06:55:32 thorpej Exp $");
#include "opt_marvell.h"
@@ -149,8 +149,8 @@ obio_cfmatch(struct device *parent, struct cfdata *cf, void *aux)
void
obio_cfattach(struct device *parent, struct device *self, void *aux)
{
- struct gt_softc * const gt = (struct gt_softc *)parent;
- struct obio_softc *sc = (struct obio_softc *)self;
+ struct gt_softc * const gt = device_private(parent);
+ struct obio_softc *sc = device_private(self);
struct gt_attach_args *ga = aux;
uint32_t datal, datah;
diff --git a/sys/dev/mca/aha_mca.c b/sys/dev/mca/aha_mca.c
index a8653606992..17ffb947ac0 100644
--- a/sys/dev/mca/aha_mca.c
+++ b/sys/dev/mca/aha_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aha_mca.c,v 1.13 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: aha_mca.c,v 1.14 2006/03/29 06:58:14 thorpej Exp $ */
/*
* Copyright (c) 2000-2002 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aha_mca.c,v 1.13 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aha_mca.c,v 1.14 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -104,7 +104,7 @@ aha_mca_attach(parent, self, aux)
void *aux;
{
struct mca_attach_args *ma = aux;
- struct aha_softc *sc = (void *)self;
+ struct aha_softc *sc = device_private(self);
bus_space_tag_t iot = ma->ma_iot;
bus_space_handle_t ioh;
struct aha_probe_data apd;
diff --git a/sys/dev/mca/com_mca.c b/sys/dev/mca/com_mca.c
index b22aed09aa5..ffe7217b7cd 100644
--- a/sys/dev/mca/com_mca.c
+++ b/sys/dev/mca/com_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com_mca.c,v 1.13 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: com_mca.c,v 1.14 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_mca.c,v 1.13 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_mca.c,v 1.14 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -162,7 +162,7 @@ com_mca_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct com_mca_softc *isc = (void *)self;
+ struct com_mca_softc *isc = device_private(self);
struct com_softc *sc = &isc->sc_com;
int iobase, irq;
struct mca_attach_args *ma = aux;
diff --git a/sys/dev/mca/ed_mca.c b/sys/dev/mca/ed_mca.c
index 09c943a201d..597f5273a0d 100644
--- a/sys/dev/mca/ed_mca.c
+++ b/sys/dev/mca/ed_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ed_mca.c,v 1.31 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: ed_mca.c,v 1.32 2006/03/29 06:58:14 thorpej Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.31 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.32 2006/03/29 06:58:14 thorpej Exp $");
#include "rnd.h"
@@ -145,8 +145,8 @@ ed_mca_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct ed_softc *ed = (void *) self;
- struct edc_mca_softc *sc = (void *) parent;
+ struct ed_softc *ed = device_private(self);
+ struct edc_mca_softc *sc = device_private(parent);
struct ed_attach_args *eda = (struct ed_attach_args *) aux;
char pbuf[8];
int drv_flags;
diff --git a/sys/dev/mca/edc_mca.c b/sys/dev/mca/edc_mca.c
index 684f887b970..34262f55820 100644
--- a/sys/dev/mca/edc_mca.c
+++ b/sys/dev/mca/edc_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: edc_mca.c,v 1.32 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: edc_mca.c,v 1.33 2006/03/29 06:58:14 thorpej Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.32 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.33 2006/03/29 06:58:14 thorpej Exp $");
#include "rnd.h"
@@ -156,7 +156,7 @@ edc_mca_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct edc_mca_softc *sc = (void *) self;
+ struct edc_mca_softc *sc = device_private(self);
struct mca_attach_args *ma = aux;
struct ed_attach_args eda;
int pos2, pos3, pos4;
diff --git a/sys/dev/mca/esp_mca.c b/sys/dev/mca/esp_mca.c
index 12fff02e446..7424e81a653 100644
--- a/sys/dev/mca/esp_mca.c
+++ b/sys/dev/mca/esp_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_mca.c,v 1.11 2006/03/08 23:46:27 lukem Exp $ */
+/* $NetBSD: esp_mca.c,v 1.12 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.11 2006/03/08 23:46:27 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.12 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -148,7 +148,7 @@ esp_mca_attach(parent, self, aux)
void *aux;
{
struct mca_attach_args *ma = aux;
- struct esp_softc *esc = (void *)self;
+ struct esp_softc *esc = device_private(self);
struct ncr53c9x_softc *sc = &esc->sc_ncr53c9x;
u_int16_t iobase;
int scsi_id, irq, drq, error;
diff --git a/sys/dev/mca/if_ate_mca.c b/sys/dev/mca/if_ate_mca.c
index 02660d9855f..345a8f8e430 100644
--- a/sys/dev/mca/if_ate_mca.c
+++ b/sys/dev/mca/if_ate_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ate_mca.c,v 1.13 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: if_ate_mca.c,v 1.14 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ate_mca.c,v 1.13 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ate_mca.c,v 1.14 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -133,7 +133,7 @@ ate_mca_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct ate_softc *isc = (struct ate_softc *)self;
+ struct ate_softc *isc = device_private(self);
struct mb86960_softc *sc = &isc->sc_mb86960;
struct mca_attach_args *ma = aux;
bus_space_tag_t iot = ma->ma_iot;
diff --git a/sys/dev/mca/if_elmc_mca.c b/sys/dev/mca/if_elmc_mca.c
index ed1b86854c6..649ab725263 100644
--- a/sys/dev/mca/if_elmc_mca.c
+++ b/sys/dev/mca/if_elmc_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_elmc_mca.c,v 1.19 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: if_elmc_mca.c,v 1.20 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_elmc_mca.c,v 1.19 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_elmc_mca.c,v 1.20 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -107,7 +107,7 @@ elmc_mca_match(struct device *parent, struct cfdata *cf, void *aux)
void
elmc_mca_attach(struct device *parent, struct device *self, void *aux)
{
- struct elmc_mca_softc *asc = (void *) self;
+ struct elmc_mca_softc *asc = device_private(self);
struct ie_softc *sc = &asc->sc_ie;
struct mca_attach_args *ma = aux;
int pos2, pos3, i, revision;
diff --git a/sys/dev/mca/if_ep_mca.c b/sys/dev/mca/if_ep_mca.c
index 3aa92ccba26..dd594aa212a 100644
--- a/sys/dev/mca/if_ep_mca.c
+++ b/sys/dev/mca/if_ep_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ep_mca.c,v 1.14 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: if_ep_mca.c,v 1.15 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ep_mca.c,v 1.14 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ep_mca.c,v 1.15 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -160,7 +160,7 @@ ep_mca_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct ep_softc *sc = (void *)self;
+ struct ep_softc *sc = device_private(self);
struct mca_attach_args *ma = aux;
bus_space_handle_t ioh;
int pos4, pos5, iobase, irq, media;
diff --git a/sys/dev/mca/if_le_mca.c b/sys/dev/mca/if_le_mca.c
index 042d3073266..e35800a5d27 100644
--- a/sys/dev/mca/if_le_mca.c
+++ b/sys/dev/mca/if_le_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le_mca.c,v 1.12 2005/12/24 20:27:42 perry Exp $ */
+/* $NetBSD: if_le_mca.c,v 1.13 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_mca.c,v 1.12 2005/12/24 20:27:42 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_mca.c,v 1.13 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -137,7 +137,7 @@ le_mca_match(struct device *parent, struct cfdata *cf, void *aux)
void
le_mca_attach(struct device *parent, struct device *self, void *aux)
{
- struct le_mca_softc *lesc = (struct le_mca_softc *) self;
+ struct le_mca_softc *lesc = device_private(self);
struct lance_softc *sc = &lesc->sc_am7990.lsc;
struct mca_attach_args *ma = aux;
int i, pos2, pos3, pos4, irq, membase, supmedia=0;
diff --git a/sys/dev/mca/if_ne_mca.c b/sys/dev/mca/if_ne_mca.c
index afc1f271bbc..c94218ca744 100644
--- a/sys/dev/mca/if_ne_mca.c
+++ b/sys/dev/mca/if_ne_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ne_mca.c,v 1.9 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: if_ne_mca.c,v 1.10 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ne_mca.c,v 1.9 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ne_mca.c,v 1.10 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -135,7 +135,7 @@ static const int ne_mca_iobase[] = {
void
ne_mca_attach(struct device *parent, struct device *self, void *aux)
{
- struct ne_mca_softc *psc = (struct ne_mca_softc *)self;
+ struct ne_mca_softc *psc = device_private(self);
struct ne2000_softc *nsc = &psc->sc_ne2000;
struct dp8390_softc *dsc = &nsc->sc_dp8390;
struct mca_attach_args *ma = aux;
diff --git a/sys/dev/mca/if_tr_mca.c b/sys/dev/mca/if_tr_mca.c
index bf0a9196822..15d7c1c23b6 100644
--- a/sys/dev/mca/if_tr_mca.c
+++ b/sys/dev/mca/if_tr_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tr_mca.c,v 1.13 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: if_tr_mca.c,v 1.14 2006/03/29 06:58:14 thorpej Exp $ */
/*_
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.13 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.14 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -117,7 +117,7 @@ tr_mca_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct tr_softc *sc = (void *) self;
+ struct tr_softc *sc = device_private(self);
struct mca_attach_args *ma = aux;
bus_space_handle_t pioh, mmioh, sramh;
int iobase, irq, sram_size, sram_addr, rom_addr;
diff --git a/sys/dev/mca/if_tra_mca.c b/sys/dev/mca/if_tra_mca.c
index 16c50f27ee2..6973eeb7e1a 100644
--- a/sys/dev/mca/if_tra_mca.c
+++ b/sys/dev/mca/if_tra_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tra_mca.c,v 1.3 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: if_tra_mca.c,v 1.4 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tra_mca.c,v 1.3 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tra_mca.c,v 1.4 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -134,7 +134,7 @@ tiara_mca_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct tiara_softc *isc = (struct tiara_softc *)self;
+ struct tiara_softc *isc = device_private(self);
struct mb86950_softc *sc = &isc->sc_mb86950;
struct mca_attach_args *ma = aux;
bus_space_tag_t iot = ma->ma_iot;
diff --git a/sys/dev/mca/if_we_mca.c b/sys/dev/mca/if_we_mca.c
index 77b61762ae1..ad70704ed31 100644
--- a/sys/dev/mca/if_we_mca.c
+++ b/sys/dev/mca/if_we_mca.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_we_mca.c,v 1.14 2005/12/11 12:22:18 christos Exp $ */
+/* $NetBSD: if_we_mca.c,v 1.15 2006/03/29 06:58:14 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_we_mca.c,v 1.14 2005/12/11 12:22:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_we_mca.c,v 1.15 2006/03/29 06:58:14 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -160,7 +160,7 @@ we_mca_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct we_softc *wsc = (struct we_softc *)self;
+ struct we_softc *wsc = device_private(self);
struct dp8390_softc *sc = &wsc->sc_dp8390;
struct mca_attach_args *ma = aux;
const struct we_mca_product *wep;
diff --git a/sys/dev/mii/acphy.c b/sys/dev/mii/acphy.c
index e8f2147f2ad..fed680a7201 100644
--- a/sys/dev/mii/acphy.c
+++ b/sys/dev/mii/acphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: acphy.c,v 1.15 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: acphy.c,v 1.16 2006/03/29 07:05:24 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.15 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.16 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -103,7 +103,7 @@ acphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
acphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/amhphy.c b/sys/dev/mii/amhphy.c
index bddc7771d88..ac545f94aa7 100644
--- a/sys/dev/mii/amhphy.c
+++ b/sys/dev/mii/amhphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: amhphy.c,v 1.11 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: amhphy.c,v 1.12 2006/03/29 07:05:24 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1.11 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1.12 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -93,7 +93,7 @@ amhphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
amhphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/bmtphy.c b/sys/dev/mii/bmtphy.c
index 3d6d1f17f4b..e5988ba4673 100644
--- a/sys/dev/mii/bmtphy.c
+++ b/sys/dev/mii/bmtphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bmtphy.c,v 1.18 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: bmtphy.c,v 1.19 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1.18 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1.19 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -138,7 +138,7 @@ bmtphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
bmtphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c
index 1f6b43545a1..39cea6e3299 100644
--- a/sys/dev/mii/brgphy.c
+++ b/sys/dev/mii/brgphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: brgphy.c,v 1.25 2005/12/10 03:03:34 jonathan Exp $ */
+/* $NetBSD: brgphy.c,v 1.26 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.25 2005/12/10 03:03:34 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.26 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -192,7 +192,7 @@ brgphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
brgphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/ciphy.c b/sys/dev/mii/ciphy.c
index d79c531b4c7..aac55a3b815 100644
--- a/sys/dev/mii/ciphy.c
+++ b/sys/dev/mii/ciphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.5 2006/03/12 22:41:41 chs Exp $ */
+/* $NetBSD: ciphy.c,v 1.6 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 2004
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.5 2006/03/12 22:41:41 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.6 2006/03/29 07:05:24 thorpej Exp $");
/*
* Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -109,7 +109,7 @@ ciphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
ciphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/dmphy.c b/sys/dev/mii/dmphy.c
index 40f60283f47..e272882ba42 100644
--- a/sys/dev/mii/dmphy.c
+++ b/sys/dev/mii/dmphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dmphy.c,v 1.23 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: dmphy.c,v 1.24 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dmphy.c,v 1.23 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dmphy.c,v 1.24 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -131,7 +131,7 @@ dmphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
dmphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/exphy.c b/sys/dev/mii/exphy.c
index 49ab13a4864..8fa6573a52e 100644
--- a/sys/dev/mii/exphy.c
+++ b/sys/dev/mii/exphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: exphy.c,v 1.40 2006/02/28 22:52:34 kleink Exp $ */
+/* $NetBSD: exphy.c,v 1.41 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exphy.c,v 1.40 2006/02/28 22:52:34 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exphy.c,v 1.41 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -123,7 +123,7 @@ exphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
exphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
diff --git a/sys/dev/mii/gentbi.c b/sys/dev/mii/gentbi.c
index ffda08afe35..a430170d0be 100644
--- a/sys/dev/mii/gentbi.c
+++ b/sys/dev/mii/gentbi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gentbi.c,v 1.14 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: gentbi.c,v 1.15 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gentbi.c,v 1.14 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gentbi.c,v 1.15 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -139,7 +139,7 @@ gentbimatch(struct device *parent, struct cfdata *match, void *aux)
static void
gentbiattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
diff --git a/sys/dev/mii/glxtphy.c b/sys/dev/mii/glxtphy.c
index 0e57e833d47..a703f3e6354 100644
--- a/sys/dev/mii/glxtphy.c
+++ b/sys/dev/mii/glxtphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: glxtphy.c,v 1.13 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: glxtphy.c,v 1.14 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: glxtphy.c,v 1.13 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: glxtphy.c,v 1.14 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -127,7 +127,7 @@ glxtphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
glxtphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/icsphy.c b/sys/dev/mii/icsphy.c
index 8678876fb4d..77d7b5bc522 100644
--- a/sys/dev/mii/icsphy.c
+++ b/sys/dev/mii/icsphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: icsphy.c,v 1.37 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: icsphy.c,v 1.38 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: icsphy.c,v 1.37 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icsphy.c,v 1.38 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -134,7 +134,7 @@ icsphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
icsphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/igphy.c b/sys/dev/mii/igphy.c
index 4390601c3d0..b92b3dbb8ca 100644
--- a/sys/dev/mii/igphy.c
+++ b/sys/dev/mii/igphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: igphy.c,v 1.6 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: igphy.c,v 1.7 2006/03/29 07:05:24 thorpej Exp $ */
/*
* The Intel copyright applies to the analog register setup, and the
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.6 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.7 2006/03/29 07:05:24 thorpej Exp $");
#include "opt_mii.h"
@@ -141,7 +141,7 @@ igphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
igphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/inphy.c b/sys/dev/mii/inphy.c
index 89878182cc2..d24e65e016b 100644
--- a/sys/dev/mii/inphy.c
+++ b/sys/dev/mii/inphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: inphy.c,v 1.38 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: inphy.c,v 1.39 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1.38 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1.39 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -134,7 +134,7 @@ inphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
inphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/iophy.c b/sys/dev/mii/iophy.c
index 1462d83aee6..df18fa0ee96 100644
--- a/sys/dev/mii/iophy.c
+++ b/sys/dev/mii/iophy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: iophy.c,v 1.24 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: iophy.c,v 1.25 2006/03/29 07:05:24 thorpej Exp $ */
/*
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iophy.c,v 1.24 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iophy.c,v 1.25 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -126,7 +126,7 @@ iophymatch(struct device *parent, struct cfdata *match, void *aux)
static void
iophyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/lxtphy.c b/sys/dev/mii/lxtphy.c
index 6387004e94f..bc39bc19089 100644
--- a/sys/dev/mii/lxtphy.c
+++ b/sys/dev/mii/lxtphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lxtphy.c,v 1.37 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: lxtphy.c,v 1.38 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lxtphy.c,v 1.37 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lxtphy.c,v 1.38 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -136,7 +136,7 @@ lxtphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
lxtphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/makphy.c b/sys/dev/mii/makphy.c
index 38d49d3b8a7..a61e4278f10 100644
--- a/sys/dev/mii/makphy.c
+++ b/sys/dev/mii/makphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: makphy.c,v 1.17 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: makphy.c,v 1.18 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.17 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.18 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -133,7 +133,7 @@ makphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
makphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c
index 07aa2e6943e..073587d3ee3 100644
--- a/sys/dev/mii/mii_physubr.c
+++ b/sys/dev/mii/mii_physubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mii_physubr.c,v 1.48 2006/03/25 23:17:36 thorpej Exp $ */
+/* $NetBSD: mii_physubr.c,v 1.49 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.48 2006/03/25 23:17:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.49 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -566,7 +566,7 @@ mii_phy_activate(struct device *self, enum devact act)
int
mii_phy_detach(struct device *self, int flags)
{
- struct mii_softc *sc = (void *) self;
+ struct mii_softc *sc = device_private(self);
if (sc->mii_flags & MIIF_DOINGAUTO)
callout_stop(&sc->mii_nway_ch);
diff --git a/sys/dev/mii/nsphy.c b/sys/dev/mii/nsphy.c
index 1403b9a847c..f4eee1f1f24 100644
--- a/sys/dev/mii/nsphy.c
+++ b/sys/dev/mii/nsphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nsphy.c,v 1.45 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: nsphy.c,v 1.46 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nsphy.c,v 1.45 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nsphy.c,v 1.46 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -126,7 +126,7 @@ nsphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
nsphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/pnaphy.c b/sys/dev/mii/pnaphy.c
index e47abe55c28..f535d1895fa 100644
--- a/sys/dev/mii/pnaphy.c
+++ b/sys/dev/mii/pnaphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pnaphy.c,v 1.12 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: pnaphy.c,v 1.13 2006/03/29 07:05:24 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pnaphy.c,v 1.12 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pnaphy.c,v 1.13 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -103,7 +103,7 @@ pnaphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
pnaphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/qsphy.c b/sys/dev/mii/qsphy.c
index 564c12df0a4..d1eaba13e82 100644
--- a/sys/dev/mii/qsphy.c
+++ b/sys/dev/mii/qsphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: qsphy.c,v 1.36 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: qsphy.c,v 1.37 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qsphy.c,v 1.36 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qsphy.c,v 1.37 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -125,7 +125,7 @@ qsphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
qsphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c
index 7527c24a22e..7d2f85ca151 100644
--- a/sys/dev/mii/rgephy.c
+++ b/sys/dev/mii/rgephy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rgephy.c,v 1.7 2005/12/11 12:22:42 christos Exp $ */
+/* $NetBSD: rgephy.c,v 1.8 2006/03/29 07:05:24 thorpej Exp $ */
/*
* Copyright (c) 2003
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.7 2005/12/11 12:22:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.8 2006/03/29 07:05:24 thorpej Exp $");
/*
@@ -101,7 +101,7 @@ rgephy_match(struct device *parent, struct cfdata *match, void *aux)
static void
rgephy_attach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c
index 44e873bfe1a..16f6c297e4a 100644
--- a/sys/dev/mii/rlphy.c
+++ b/sys/dev/mii/rlphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rlphy.c,v 1.8 2006/03/25 23:17:36 thorpej Exp $ */
+/* $NetBSD: rlphy.c,v 1.9 2006/03/29 07:05:24 thorpej Exp $ */
/* $OpenBSD: rlphy.c,v 1.20 2005/07/31 05:27:30 pvalchev Exp $ */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.8 2006/03/25 23:17:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rlphy.c,v 1.9 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -104,7 +104,7 @@ rlphymatch(struct device *parent, struct cfdata *match, void *aux)
void
rlphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
diff --git a/sys/dev/mii/sqphy.c b/sys/dev/mii/sqphy.c
index f382ef37fb1..1cdf0d24698 100644
--- a/sys/dev/mii/sqphy.c
+++ b/sys/dev/mii/sqphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sqphy.c,v 1.38 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: sqphy.c,v 1.39 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sqphy.c,v 1.38 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sqphy.c,v 1.39 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -136,7 +136,7 @@ sqphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
sqphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/tlphy.c b/sys/dev/mii/tlphy.c
index 06897efa08e..301831ccdf8 100644
--- a/sys/dev/mii/tlphy.c
+++ b/sys/dev/mii/tlphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tlphy.c,v 1.45 2006/03/25 23:17:36 thorpej Exp $ */
+/* $NetBSD: tlphy.c,v 1.46 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tlphy.c,v 1.45 2006/03/25 23:17:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tlphy.c,v 1.46 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -140,8 +140,8 @@ tlphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
tlphyattach(struct device *parent, struct device *self, void *aux)
{
- struct tlphy_softc *sc = (struct tlphy_softc *)self;
- struct tl_softc *tlsc = (struct tl_softc *)device_parent(self);
+ struct tlphy_softc *sc = device_private(self);
+ struct tl_softc *tlsc = device_private(device_parent(self));
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
@@ -204,7 +204,7 @@ tlphyattach(struct device *parent, struct device *self, void *aux)
static int
tlphy_service(struct mii_softc *self, struct mii_data *mii, int cmd)
{
- struct tlphy_softc *sc = (struct tlphy_softc *)self;
+ struct tlphy_softc *sc = device_private(self);
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
int reg;
diff --git a/sys/dev/mii/tqphy.c b/sys/dev/mii/tqphy.c
index 19908df7de4..85a5e1a7685 100644
--- a/sys/dev/mii/tqphy.c
+++ b/sys/dev/mii/tqphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tqphy.c,v 1.27 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: tqphy.c,v 1.28 2006/03/29 07:05:24 thorpej Exp $ */
/*
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tqphy.c,v 1.27 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tqphy.c,v 1.28 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -133,7 +133,7 @@ tqphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
tqphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
const struct mii_phydesc *mpd;
diff --git a/sys/dev/mii/ukphy.c b/sys/dev/mii/ukphy.c
index c5830b2dad1..7789c58d44d 100644
--- a/sys/dev/mii/ukphy.c
+++ b/sys/dev/mii/ukphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ukphy.c,v 1.26 2006/02/20 16:50:37 thorpej Exp $ */
+/* $NetBSD: ukphy.c,v 1.27 2006/03/29 07:05:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.26 2006/02/20 16:50:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.27 2006/03/29 07:05:24 thorpej Exp $");
#include "opt_mii.h"
@@ -123,7 +123,7 @@ ukphymatch(struct device *parent, struct cfdata *match, void *aux)
static void
ukphyattach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
int oui = MII_OUI(ma->mii_id1, ma->mii_id2);
diff --git a/sys/dev/mii/urlphy.c b/sys/dev/mii/urlphy.c
index 7d66ed756bd..0563b2172e0 100644
--- a/sys/dev/mii/urlphy.c
+++ b/sys/dev/mii/urlphy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: urlphy.c,v 1.14 2006/02/28 22:40:15 kleink Exp $ */
+/* $NetBSD: urlphy.c,v 1.15 2006/03/29 07:05:24 thorpej Exp $ */
/*
* Copyright (c) 2001, 2002
* Shingo WATANABE <nabe@nabechan.org>. All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.14 2006/02/28 22:40:15 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.15 2006/03/29 07:05:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -96,7 +96,7 @@ urlphy_match(struct device *parent, struct cfdata *match, void *aux)
static void
urlphy_attach(struct device *parent, struct device *self, void *aux)
{
- struct mii_softc *sc = (struct mii_softc *)self;
+ struct mii_softc *sc = device_private(self);
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
diff --git a/sys/dev/mscp/mscp_disk.c b/sys/dev/mscp/mscp_disk.c
index 04703baa930..6d263cb02a8 100644
--- a/sys/dev/mscp/mscp_disk.c
+++ b/sys/dev/mscp/mscp_disk.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_disk.c,v 1.52 2006/03/29 04:47:13 thorpej Exp $ */
+/* $NetBSD: mscp_disk.c,v 1.53 2006/03/29 07:06:24 thorpej Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.52 2006/03/29 04:47:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.53 2006/03/29 07:06:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -684,7 +684,7 @@ rxattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct rx_softc *rx = (void *)self;
+ struct rx_softc *rx = device_private(self);
struct drive_attach_args *da = aux;
struct mscp *mp = da->da_mp;
struct mscp_softc *mi = (void *)parent;
diff --git a/sys/dev/mscp/mscp_subr.c b/sys/dev/mscp/mscp_subr.c
index c18b8697662..816921d3c2f 100644
--- a/sys/dev/mscp/mscp_subr.c
+++ b/sys/dev/mscp/mscp_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_subr.c,v 1.31 2006/03/25 23:20:18 thorpej Exp $ */
+/* $NetBSD: mscp_subr.c,v 1.32 2006/03/29 07:06:24 thorpej Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_subr.c,v 1.31 2006/03/25 23:20:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_subr.c,v 1.32 2006/03/29 07:06:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -166,7 +166,7 @@ mscp_attach(parent, self, aux)
void *aux;
{
struct mscp_attach_args *ma = aux;
- struct mscp_softc *mi = (void *)self;
+ struct mscp_softc *mi = device_private(self);
struct mscp *mp2;
volatile struct mscp *mp;
volatile int i;
diff --git a/sys/dev/mscp/mscp_tape.c b/sys/dev/mscp/mscp_tape.c
index 44e8195da4d..84d577d562a 100644
--- a/sys/dev/mscp/mscp_tape.c
+++ b/sys/dev/mscp/mscp_tape.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_tape.c,v 1.28 2006/03/25 23:20:18 thorpej Exp $ */
+/* $NetBSD: mscp_tape.c,v 1.29 2006/03/29 07:06:24 thorpej Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.28 2006/03/25 23:20:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.29 2006/03/29 07:06:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -161,7 +161,7 @@ mtattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct mt_softc *mt = (void *)self;
+ struct mt_softc *mt = device_private(self);
struct drive_attach_args *da = aux;
struct mscp *mp = da->da_mp;
struct mscp_softc *mi = (void *)parent;
diff --git a/sys/dev/mvme/clmpcc_pcctwo.c b/sys/dev/mvme/clmpcc_pcctwo.c
index e699e7ec8d3..800243b3a1e 100644
--- a/sys/dev/mvme/clmpcc_pcctwo.c
+++ b/sys/dev/mvme/clmpcc_pcctwo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: clmpcc_pcctwo.c,v 1.10 2005/12/11 12:22:47 christos Exp $ */
+/* $NetBSD: clmpcc_pcctwo.c,v 1.11 2006/03/29 07:07:41 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clmpcc_pcctwo.c,v 1.10 2005/12/11 12:22:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clmpcc_pcctwo.c,v 1.11 2006/03/29 07:07:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -127,7 +127,7 @@ clmpcc_pcctwo_attach(parent, self, aux)
struct pcctwo_attach_args *pa;
int level = pa->pa_ipl;
- sc = (struct clmpcc_softc *)self;
+ sc = device_private(self);
pa = aux;
level = pa->pa_ipl;
sc->sc_iot = pa->pa_bust;
diff --git a/sys/dev/mvme/clock_pcctwo.c b/sys/dev/mvme/clock_pcctwo.c
index 8f573815e22..3b053e5f727 100644
--- a/sys/dev/mvme/clock_pcctwo.c
+++ b/sys/dev/mvme/clock_pcctwo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: clock_pcctwo.c,v 1.9 2005/12/11 12:22:47 christos Exp $ */
+/* $NetBSD: clock_pcctwo.c,v 1.10 2006/03/29 07:07:41 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock_pcctwo.c,v 1.9 2005/12/11 12:22:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock_pcctwo.c,v 1.10 2006/03/29 07:07:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -111,7 +111,7 @@ clock_pcctwo_attach(parent, self, aux)
struct clock_pcctwo_softc *sc;
struct pcctwo_attach_args *pa;
- sc = clock_pcctwo_sc = (struct clock_pcctwo_softc *) self;
+ sc = clock_pcctwo_sc = device_private(self);
pa = aux;
if (pa->pa_ipl != CLOCK_LEVEL)
diff --git a/sys/dev/mvme/if_ie_mvme.c b/sys/dev/mvme/if_ie_mvme.c
index 05affd49dd3..395444b0ece 100644
--- a/sys/dev/mvme/if_ie_mvme.c
+++ b/sys/dev/mvme/if_ie_mvme.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie_mvme.c,v 1.8 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: if_ie_mvme.c,v 1.9 2006/03/29 07:07:41 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c,v 1.8 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c,v 1.9 2006/03/29 07:07:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -281,8 +281,8 @@ ie_pcctwo_attach(parent, self, args)
int rseg;
pa = (struct pcctwo_attach_args *) args;
- ps = (struct ie_pcctwo_softc *) self;
- sc = (struct ie_softc *) self;
+ ps = device_private(self);
+ sc = device_private(self);
/* Map the MPU controller registers in PCCTWO space */
ps->ps_bust = pa->pa_bust;
diff --git a/sys/dev/mvme/lpt_pcctwo.c b/sys/dev/mvme/lpt_pcctwo.c
index f8ea536acc2..bba23bc3a49 100644
--- a/sys/dev/mvme/lpt_pcctwo.c
+++ b/sys/dev/mvme/lpt_pcctwo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lpt_pcctwo.c,v 1.7 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: lpt_pcctwo.c,v 1.8 2006/03/29 07:07:41 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpt_pcctwo.c,v 1.7 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt_pcctwo.c,v 1.8 2006/03/29 07:07:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -125,7 +125,7 @@ lpt_pcctwo_attach(parent, self, args)
struct lpt_softc *sc;
pa = (struct pcctwo_attach_args *) args;
- sc = (struct lpt_softc *) self;
+ sc = device_private(self);
/* The printer registers are part of the PCCChip2's own registers. */
sc->sc_bust = pa->pa_bust;
diff --git a/sys/dev/mvme/osiop_pcctwo.c b/sys/dev/mvme/osiop_pcctwo.c
index 4dd547b1e23..7d081d515ef 100644
--- a/sys/dev/mvme/osiop_pcctwo.c
+++ b/sys/dev/mvme/osiop_pcctwo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: osiop_pcctwo.c,v 1.9 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: osiop_pcctwo.c,v 1.10 2006/03/29 07:07:41 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osiop_pcctwo.c,v 1.9 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osiop_pcctwo.c,v 1.10 2006/03/29 07:07:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -122,7 +122,7 @@ osiop_pcctwo_attach(parent, self, args)
int clk, ctest7;
pa = (struct pcctwo_attach_args *) args;
- sc = (struct osiop_pcctwo_softc *) self;
+ sc = device_private(self);
/*
* On the '17x the siop's clock is the same as the CPU clock.
diff --git a/sys/dev/ofisa/atppc_ofisa.c b/sys/dev/ofisa/atppc_ofisa.c
index b901e141bad..39ca5103e67 100644
--- a/sys/dev/ofisa/atppc_ofisa.c
+++ b/sys/dev/ofisa/atppc_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: atppc_ofisa.c,v 1.3 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: atppc_ofisa.c,v 1.4 2006/03/29 07:09:33 thorpej Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.3 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.4 2006/03/29 07:09:33 thorpej Exp $");
#include "opt_atppc.h"
@@ -102,8 +102,8 @@ atppc_ofisa_match(struct device *parent, struct cfdata *match, void *aux)
static void
atppc_ofisa_attach(struct device *parent, struct device *self, void *aux)
{
- struct atppc_softc *sc = (struct atppc_softc *) self;
- struct atppc_ofisa_softc *asc = (struct atppc_ofisa_softc *)self;
+ struct atppc_softc *sc = device_private(self);
+ struct atppc_ofisa_softc *asc = device_private(self);
struct ofisa_attach_args *aa = aux;
struct ofisa_reg_desc reg;
struct ofisa_intr_desc intr;
diff --git a/sys/dev/ofisa/com_ofisa.c b/sys/dev/ofisa/com_ofisa.c
index 1d3e350daef..9db4d89c207 100644
--- a/sys/dev/ofisa/com_ofisa.c
+++ b/sys/dev/ofisa/com_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com_ofisa.c,v 1.9 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: com_ofisa.c,v 1.10 2006/03/29 07:09:33 thorpej Exp $ */
/*
* Copyright 1997, 1998
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_ofisa.c,v 1.9 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_ofisa.c,v 1.10 2006/03/29 07:09:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -92,7 +92,7 @@ com_ofisa_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct com_ofisa_softc *osc = (void *)self;
+ struct com_ofisa_softc *osc = device_private(self);
struct com_softc *sc = &osc->sc_com;
struct ofisa_attach_args *aa = aux;
struct ofisa_reg_desc reg;
diff --git a/sys/dev/ofisa/ess_ofisa.c b/sys/dev/ofisa/ess_ofisa.c
index 8cdbdcd85ce..68b6f816e99 100644
--- a/sys/dev/ofisa/ess_ofisa.c
+++ b/sys/dev/ofisa/ess_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ess_ofisa.c,v 1.16 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: ess_ofisa.c,v 1.17 2006/03/29 07:09:33 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c,v 1.16 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c,v 1.17 2006/03/29 07:09:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -92,7 +92,7 @@ ess_ofisa_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct ess_softc *sc = (void *)self;
+ struct ess_softc *sc = device_private(self);
struct ofisa_attach_args *aa = aux;
struct ofisa_reg_desc reg;
struct ofisa_intr_desc intr[2];
diff --git a/sys/dev/ofisa/if_cs_ofisa.c b/sys/dev/ofisa/if_cs_ofisa.c
index 7eeabd3718c..0266683a4e9 100644
--- a/sys/dev/ofisa/if_cs_ofisa.c
+++ b/sys/dev/ofisa/if_cs_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cs_ofisa.c,v 1.14 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: if_cs_ofisa.c,v 1.15 2006/03/29 07:09:33 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cs_ofisa.c,v 1.14 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cs_ofisa.c,v 1.15 2006/03/29 07:09:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -105,7 +105,7 @@ cs_ofisa_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct cs_softc *sc = (struct cs_softc *) self;
+ struct cs_softc *sc = device_private(self);
struct cs_softc_isa *isc = (void *)sc;
struct ofisa_attach_args *aa = aux;
struct ofisa_reg_desc reg[2];
diff --git a/sys/dev/ofisa/joy_ofisa.c b/sys/dev/ofisa/joy_ofisa.c
index 5481f0b6e5e..6255f74d887 100644
--- a/sys/dev/ofisa/joy_ofisa.c
+++ b/sys/dev/ofisa/joy_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: joy_ofisa.c,v 1.9 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: joy_ofisa.c,v 1.10 2006/03/29 07:09:33 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c,v 1.9 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c,v 1.10 2006/03/29 07:09:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -83,7 +83,7 @@ joy_ofisa_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct joy_softc *sc = (struct joy_softc *)self;
+ struct joy_softc *sc = device_private(self);
struct ofisa_attach_args *aa = aux;
struct ofisa_reg_desc reg;
char *model = NULL;
diff --git a/sys/dev/ofisa/lpt_ofisa.c b/sys/dev/ofisa/lpt_ofisa.c
index b09f2dcf326..720d5a3d5e6 100644
--- a/sys/dev/ofisa/lpt_ofisa.c
+++ b/sys/dev/ofisa/lpt_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lpt_ofisa.c,v 1.10 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: lpt_ofisa.c,v 1.11 2006/03/29 07:09:33 thorpej Exp $ */
/*
* Copyright 1997, 1998
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpt_ofisa.c,v 1.10 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt_ofisa.c,v 1.11 2006/03/29 07:09:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -92,7 +92,7 @@ lpt_ofisa_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct lpt_ofisa_softc *osc = (void *)self;
+ struct lpt_ofisa_softc *osc = device_private(self);
struct lpt_softc *sc = &osc->sc_lpt;
struct ofisa_attach_args *aa = aux;
struct ofisa_reg_desc reg;
diff --git a/sys/dev/ofisa/pckbc_ofisa.c b/sys/dev/ofisa/pckbc_ofisa.c
index 69aaf89343d..0aac5092d12 100644
--- a/sys/dev/ofisa/pckbc_ofisa.c
+++ b/sys/dev/ofisa/pckbc_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc_ofisa.c,v 1.10 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: pckbc_ofisa.c,v 1.11 2006/03/29 07:09:33 thorpej Exp $ */
/*
* Copyright (c) 1998
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc_ofisa.c,v 1.10 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_ofisa.c,v 1.11 2006/03/29 07:09:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -85,7 +85,7 @@ pckbc_ofisa_match(struct device *parent, struct cfdata *match, void *aux)
static void
pckbc_ofisa_attach(struct device *parent, struct device *self, void *aux)
{
- struct pckbc_ofisa_softc *osc = (void *)self;
+ struct pckbc_ofisa_softc *osc = device_private(self);
struct pckbc_softc *sc = &osc->sc_pckbc;
struct ofisa_attach_args *aa = aux;
struct pckbc_internal *t;
diff --git a/sys/dev/ofisa/sb_ofisa.c b/sys/dev/ofisa/sb_ofisa.c
index e7630d83545..effa3823899 100644
--- a/sys/dev/ofisa/sb_ofisa.c
+++ b/sys/dev/ofisa/sb_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sb_ofisa.c,v 1.13 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: sb_ofisa.c,v 1.14 2006/03/29 07:09:33 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v 1.13 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v 1.14 2006/03/29 07:09:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,7 +98,7 @@ sb_ofisa_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct sbdsp_softc *sc = (void *)self;
+ struct sbdsp_softc *sc = device_private(self);
struct ofisa_attach_args *aa = aux;
struct ofisa_reg_desc reg;
struct ofisa_intr_desc intr;
diff --git a/sys/dev/ofisa/wdc_ofisa.c b/sys/dev/ofisa/wdc_ofisa.c
index 6f266337f43..aacbda23d25 100644
--- a/sys/dev/ofisa/wdc_ofisa.c
+++ b/sys/dev/ofisa/wdc_ofisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_ofisa.c,v 1.27 2006/01/16 20:30:19 bouyer Exp $ */
+/* $NetBSD: wdc_ofisa.c,v 1.28 2006/03/29 07:09:33 thorpej Exp $ */
/*
* Copyright 1997, 1998
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.27 2006/01/16 20:30:19 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.28 2006/03/29 07:09:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -91,7 +91,7 @@ wdc_ofisa_probe(struct device *parent, struct cfdata *cf, void *aux)
static void
wdc_ofisa_attach(struct device *parent, struct device *self, void *aux)
{
- struct wdc_ofisa_softc *sc = (void *)self;
+ struct wdc_ofisa_softc *sc = device_private(self);
struct wdc_regs *wdr;
struct ofisa_attach_args *aa = aux;
struct ofisa_reg_desc reg[2];
diff --git a/sys/dev/ofw/ofcons.c b/sys/dev/ofw/ofcons.c
index 0fa4d129bab..eb5940bf64f 100644
--- a/sys/dev/ofw/ofcons.c
+++ b/sys/dev/ofw/ofcons.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ofcons.c,v 1.24 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: ofcons.c,v 1.25 2006/03/29 07:10:25 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.24 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.25 2006/03/29 07:10:25 thorpej Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -105,7 +105,7 @@ ofcons_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct ofcons_softc *sc = (struct ofcons_softc *) self;
+ struct ofcons_softc *sc = device_private(self);
printf("\n");
diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c
index a9e1d88f1b0..529158e55fb 100644
--- a/sys/dev/ofw/ofdisk.c
+++ b/sys/dev/ofw/ofdisk.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ofdisk.c,v 1.32 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: ofdisk.c,v 1.33 2006/03/29 07:10:25 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.32 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.33 2006/03/29 07:10:25 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -119,7 +119,7 @@ ofdisk_match(struct device *parent, struct cfdata *match, void *aux)
static void
ofdisk_attach(struct device *parent, struct device *self, void *aux)
{
- struct ofdisk_softc *of = (void *)self;
+ struct ofdisk_softc *of = device_private(self);
struct ofbus_attach_args *oba = aux;
char child[64];
int l;
diff --git a/sys/dev/ofw/ofnet.c b/sys/dev/ofw/ofnet.c
index 2f0767b67a0..1c0ab75bff6 100644
--- a/sys/dev/ofw/ofnet.c
+++ b/sys/dev/ofw/ofnet.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ofnet.c,v 1.35 2006/03/28 17:38:34 thorpej Exp $ */
+/* $NetBSD: ofnet.c,v 1.36 2006/03/29 07:10:25 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.35 2006/03/28 17:38:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.36 2006/03/29 07:10:25 thorpej Exp $");
#include "ofnet.h"
#include "opt_inet.h"
@@ -126,7 +126,7 @@ ofnet_match(struct device *parent, struct cfdata *match, void *aux)
static void
ofnet_attach(struct device *parent, struct device *self, void *aux)
{
- struct ofnet_softc *of = (void *)self;
+ struct ofnet_softc *of = device_private(self);
struct ifnet *ifp = &of->sc_ethercom.ec_if;
struct ofbus_attach_args *oba = aux;
char path[256];
diff --git a/sys/dev/ofw/ofrtc.c b/sys/dev/ofw/ofrtc.c
index b0b96201cc2..7e6e677ca9d 100644
--- a/sys/dev/ofw/ofrtc.c
+++ b/sys/dev/ofw/ofrtc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ofrtc.c,v 1.18 2005/12/11 12:22:48 christos Exp $ */
+/* $NetBSD: ofrtc.c,v 1.19 2006/03/29 07:10:25 thorpej Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofrtc.c,v 1.18 2005/12/11 12:22:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofrtc.c,v 1.19 2006/03/29 07:10:25 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -85,7 +85,7 @@ ofrtc_match(struct device *parent, struct cfdata *match, void *aux)
static void
ofrtc_attach(struct device *parent, struct device *self, void *aux)
{
- struct ofrtc_softc *of = (void *)self;
+ struct ofrtc_softc *of = device_private(self);
struct ofbus_attach_args *oba = aux;
char name[32];
int l;
diff --git a/sys/dev/pckbport/pckbd.c b/sys/dev/pckbport/pckbd.c
index bd4f53079f8..5cc2ebf3175 100644
--- a/sys/dev/pckbport/pckbd.c
+++ b/sys/dev/pckbport/pckbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbd.c,v 1.9 2005/12/11 12:23:22 christos Exp $ */
+/* $NetBSD: pckbd.c,v 1.10 2006/03/29 07:11:08 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.9 2005/12/11 12:23:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.10 2006/03/29 07:11:08 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -304,7 +304,7 @@ pckbdprobe(struct device *parent, struct cfdata *cf, void *aux)
void
pckbdattach(struct device *parent, struct device *self, void *aux)
{
- struct pckbd_softc *sc = (void *)self;
+ struct pckbd_softc *sc = device_private(self);
struct pckbport_attach_args *pa = aux;
struct wskbddev_attach_args a;
int isconsole;
diff --git a/sys/dev/pckbport/pms.c b/sys/dev/pckbport/pms.c
index 74f7b5a62a1..2604dd19787 100644
--- a/sys/dev/pckbport/pms.c
+++ b/sys/dev/pckbport/pms.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pms.c,v 1.9 2005/12/11 12:23:22 christos Exp $ */
+/* $NetBSD: pms.c,v 1.10 2006/03/29 07:11:08 thorpej Exp $ */
/*-
* Copyright (c) 2004 Kentaro Kurahone.
@@ -28,7 +28,7 @@
#include "opt_pms.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.9 2005/12/11 12:23:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.10 2006/03/29 07:11:08 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -170,7 +170,7 @@ pmsprobe(struct device *parent, struct cfdata *match, void *aux)
void
pmsattach(struct device *parent, struct device *self, void *aux)
{
- struct pms_softc *sc = (void *)self;
+ struct pms_softc *sc = device_private(self);
struct pckbport_attach_args *pa = aux;
struct wsmousedev_attach_args a;
u_char cmd[2], resp[2];
diff --git a/sys/dev/podulebus/acemidi.c b/sys/dev/podulebus/acemidi.c
index 65503a4141f..b95768d2b10 100644
--- a/sys/dev/podulebus/acemidi.c
+++ b/sys/dev/podulebus/acemidi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: acemidi.c,v 1.10 2005/12/11 12:23:28 christos Exp $ */
+/* $NetBSD: acemidi.c,v 1.11 2006/03/29 07:12:56 thorpej Exp $ */
/*-
* Copyright (c) 2001 Ben Harris
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acemidi.c,v 1.10 2005/12/11 12:23:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acemidi.c,v 1.11 2006/03/29 07:12:56 thorpej Exp $");
#include <sys/param.h>
@@ -78,7 +78,7 @@ acemidi_match(struct device *parent, struct cfdata *cf, void *aux)
static void
acemidi_attach(struct device *parent, struct device *self, void *aux)
{
-/* struct acemidi_softc *sc = (void *)self; */
+/* struct acemidi_softc *sc = device_private(self); */
/* struct podulebus_attach_args *pa = aux; */
printf("\n");
@@ -95,7 +95,7 @@ com_acemidi_match(struct device *parent, struct cfdata *cf, void *aux)
static void
com_acemidi_attach(struct device *parent, struct device *self, void *aux)
{
- struct com_acemidi_softc *sc = (void *)self;
+ struct com_acemidi_softc *sc = device_private(self);
struct com_softc *csc = &sc->sc_com;
struct podulebus_attach_args *pa = aux;
diff --git a/sys/dev/podulebus/dtide.c b/sys/dev/podulebus/dtide.c
index 3d3c34da906..084b5523c84 100644
--- a/sys/dev/podulebus/dtide.c
+++ b/sys/dev/podulebus/dtide.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dtide.c,v 1.21 2006/01/16 20:30:19 bouyer Exp $ */
+/* $NetBSD: dtide.c,v 1.22 2006/03/29 07:12:56 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.21 2006/01/16 20:30:19 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.22 2006/03/29 07:12:56 thorpej Exp $");
#include <sys/param.h>
@@ -80,7 +80,7 @@ static void
dtide_attach(struct device *parent, struct device *self, void *aux)
{
struct podulebus_attach_args *pa = aux;
- struct dtide_softc *sc = (void *)self;
+ struct dtide_softc *sc = device_private(self);
struct wdc_regs *wdr;
struct ata_channel *ch;
int i, j;
diff --git a/sys/dev/podulebus/hcide.c b/sys/dev/podulebus/hcide.c
index 30542ff552f..fa328082343 100644
--- a/sys/dev/podulebus/hcide.c
+++ b/sys/dev/podulebus/hcide.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hcide.c,v 1.18 2006/01/16 20:30:19 bouyer Exp $ */
+/* $NetBSD: hcide.c,v 1.19 2006/03/29 07:12:56 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.18 2006/01/16 20:30:19 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.19 2006/03/29 07:12:56 thorpej Exp $");
#include <sys/param.h>
@@ -79,7 +79,7 @@ hcide_match(struct device *parent, struct cfdata *cf, void *aux)
static void
hcide_attach(struct device *parent, struct device *self, void *aux)
{
- struct hcide_softc *sc = (void *)self;
+ struct hcide_softc *sc = device_private(self);
struct wdc_regs *wdr;
struct podulebus_attach_args *pa = aux;
struct ata_channel *ch;
diff --git a/sys/dev/podulebus/hcsc.c b/sys/dev/podulebus/hcsc.c
index 53f7785d0da..4ea8051c238 100644
--- a/sys/dev/podulebus/hcsc.c
+++ b/sys/dev/podulebus/hcsc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hcsc.c,v 1.16 2005/12/24 20:27:52 perry Exp $ */
+/* $NetBSD: hcsc.c,v 1.17 2006/03/29 07:12:56 thorpej Exp $ */
/*
* Copyright (c) 2001 Ben Harris
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hcsc.c,v 1.16 2005/12/24 20:27:52 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hcsc.c,v 1.17 2006/03/29 07:12:56 thorpej Exp $");
#include <sys/param.h>
@@ -153,7 +153,7 @@ hcsc_match(struct device *parent, struct cfdata *cf, void *aux)
void
hcsc_attach(struct device *parent, struct device *self, void *aux)
{
- struct hcsc_softc *sc = (struct hcsc_softc *)self;
+ struct hcsc_softc *sc = device_private(self);
struct podulebus_attach_args *pa = aux;
#ifndef NCR5380_USE_BUS_SPACE
u_char *iobase;
diff --git a/sys/dev/podulebus/if_ea.c b/sys/dev/podulebus/if_ea.c
index 28a04ccc0dc..84b1ce44b96 100644
--- a/sys/dev/podulebus/if_ea.c
+++ b/sys/dev/podulebus/if_ea.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ea.c,v 1.11 2005/12/11 12:23:28 christos Exp $ */
+/* $NetBSD: if_ea.c,v 1.12 2006/03/29 07:12:56 thorpej Exp $ */
/*
* Copyright (c) 2000, 2001 Ben Harris
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ea.c,v 1.11 2005/12/11 12:23:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ea.c,v 1.12 2006/03/29 07:12:56 thorpej Exp $");
#include <sys/param.h>
@@ -103,7 +103,7 @@ eaprobe(struct device *parent, struct cfdata *cf, void *aux)
void
eaattach(struct device *parent, struct device *self, void *aux)
{
- struct ea_softc *sc = (void *)self;
+ struct ea_softc *sc = device_private(self);
struct podulebus_attach_args *pa = aux;
u_int8_t myaddr[ETHER_ADDR_LEN];
char *ptr;
diff --git a/sys/dev/podulebus/if_eb.c b/sys/dev/podulebus/if_eb.c
index 81f271c93a0..2a22ae1979b 100644
--- a/sys/dev/podulebus/if_eb.c
+++ b/sys/dev/podulebus/if_eb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_eb.c,v 1.9 2005/12/11 12:23:28 christos Exp $ */
+/* $NetBSD: if_eb.c,v 1.10 2006/03/29 07:12:56 thorpej Exp $ */
/*
* Copyright (c) 2000, 2001 Ben Harris
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_eb.c,v 1.9 2005/12/11 12:23:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_eb.c,v 1.10 2006/03/29 07:12:56 thorpej Exp $");
#include <sys/param.h>
@@ -103,7 +103,7 @@ ebprobe(struct device *parent, struct cfdata *cf, void *aux)
void
ebattach(struct device *parent, struct device *self, void *aux)
{
- struct eb_softc *sc = (void *)self;
+ struct eb_softc *sc = device_private(self);
struct podulebus_attach_args *pa = aux;
u_int8_t myaddr[ETHER_ADDR_LEN];
diff --git a/sys/dev/podulebus/if_ei.c b/sys/dev/podulebus/if_ei.c
index af52b58c9bb..2c7845dce0c 100644
--- a/sys/dev/podulebus/if_ei.c
+++ b/sys/dev/podulebus/if_ei.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ei.c,v 1.11 2006/03/19 23:45:13 he Exp $ */
+/* $NetBSD: if_ei.c,v 1.12 2006/03/29 07:12:56 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ei.c,v 1.11 2006/03/19 23:45:13 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ei.c,v 1.12 2006/03/29 07:12:56 thorpej Exp $");
#include <sys/param.h>
@@ -114,7 +114,7 @@ static void
ei_attach(struct device *parent, struct device *self, void *aux)
{
struct podulebus_attach_args *pa = aux;
- struct ei_softc *sc = (struct ei_softc *)self;
+ struct ei_softc *sc = device_private(self);
int i;
char descr[16];
diff --git a/sys/dev/podulebus/oak.c b/sys/dev/podulebus/oak.c
index e804780f39d..1d94213ea2e 100644
--- a/sys/dev/podulebus/oak.c
+++ b/sys/dev/podulebus/oak.c
@@ -1,4 +1,4 @@
-/* $NetBSD: oak.c,v 1.16 2005/12/24 20:27:52 perry Exp $ */
+/* $NetBSD: oak.c,v 1.17 2006/03/29 07:12:56 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oak.c,v 1.16 2005/12/24 20:27:52 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oak.c,v 1.17 2006/03/29 07:12:56 thorpej Exp $");
#include <sys/param.h>
@@ -143,7 +143,7 @@ oak_match(struct device *parent, struct cfdata *cf, void *aux)
void
oak_attach(struct device *parent, struct device *self, void *aux)
{
- struct oak_softc *sc = (struct oak_softc *)self;
+ struct oak_softc *sc = device_private(self);
struct podulebus_attach_args *pa = aux;
#ifndef NCR5380_USE_BUS_SPACE
u_char *iobase;