diff options
| author | thorpej <thorpej@NetBSD.org> | 2006-03-29 06:22:38 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2006-03-29 06:22:38 +0000 |
| commit | 0bb04182805569f7d82810166111e19ffde3bcb6 (patch) | |
| tree | 398be1b89a06ea89bc879ce5ff21d4b0833b5577 /sys/dev | |
| parent | 35947a37ad2980c0e0c2eeee9f955b5d5748d822 (diff) | |
Use device_private().
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/cardbus/adv_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/ahc_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/cardbus.c | 10 | ||||
| -rw-r--r-- | sys/dev/cardbus/cardslot.c | 6 | ||||
| -rw-r--r-- | sys/dev/cardbus/com_cardbus.c | 14 | ||||
| -rw-r--r-- | sys/dev/cardbus/ehci_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/fwohci_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_ath_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_atw_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_ex_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_fxp_cardbus.c | 12 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_ral_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_re_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_rtk_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_rtw_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/if_tlp_cardbus.c | 8 | ||||
| -rw-r--r-- | sys/dev/cardbus/rbus_ppb.c | 12 | ||||
| -rw-r--r-- | sys/dev/cardbus/uhci_cardbus.c | 8 |
18 files changed, 79 insertions, 79 deletions
diff --git a/sys/dev/cardbus/adv_cardbus.c b/sys/dev/cardbus/adv_cardbus.c index a6110dff12b..0936e35d4fb 100644 --- a/sys/dev/cardbus/adv_cardbus.c +++ b/sys/dev/cardbus/adv_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: adv_cardbus.c,v 1.12 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: adv_cardbus.c,v 1.13 2006/03/29 06:22:38 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adv_cardbus.c,v 1.12 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adv_cardbus.c,v 1.13 2006/03/29 06:22:38 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -117,7 +117,7 @@ adv_cardbus_attach(parent, self, aux) void *aux; { struct cardbus_attach_args *ca = aux; - struct adv_cardbus_softc *csc = (void *) self; + struct adv_cardbus_softc *csc = device_private(self); struct asc_softc *sc = &csc->sc_adv; cardbus_devfunc_t ct = ca->ca_ct; cardbus_chipset_tag_t cc = ct->ct_cc; @@ -255,7 +255,7 @@ adv_cardbus_detach(self, flags) struct device *self; int flags; { - struct adv_cardbus_softc *csc = (void*)self; + struct adv_cardbus_softc *csc = device_private(self); struct asc_softc *sc = &csc->sc_adv; int rv; diff --git a/sys/dev/cardbus/ahc_cardbus.c b/sys/dev/cardbus/ahc_cardbus.c index 5724ed8b8cb..63a2b3f7ffb 100644 --- a/sys/dev/cardbus/ahc_cardbus.c +++ b/sys/dev/cardbus/ahc_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: ahc_cardbus.c,v 1.18 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: ahc_cardbus.c,v 1.19 2006/03/29 06:22:38 thorpej Exp $ */ /*- * Copyright (c) 2000, 2005 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ahc_cardbus.c,v 1.18 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahc_cardbus.c,v 1.19 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_ahc_cardbus.h" @@ -121,7 +121,7 @@ ahc_cardbus_attach(parent, self, aux) void *aux; { struct cardbus_attach_args *ca = aux; - struct ahc_cardbus_softc *csc = (void *) self; + struct ahc_cardbus_softc *csc = device_private(self); struct ahc_softc *ahc = &csc->sc_ahc; cardbus_devfunc_t ct = ca->ca_ct; cardbus_chipset_tag_t cc = ct->ct_cc; @@ -272,7 +272,7 @@ ahc_cardbus_detach(self, flags) struct device *self; int flags; { - struct ahc_cardbus_softc *csc = (void*)self; + struct ahc_cardbus_softc *csc = device_private(self); struct ahc_softc *ahc = &csc->sc_ahc; int rv; diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 90f6b2e489e..c23e9bba1ef 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: cardbus.c,v 1.70 2006/03/29 06:00:46 thorpej Exp $ */ +/* $NetBSD: cardbus.c,v 1.71 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 1997, 1998, 1999 and 2000 @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.70 2006/03/29 06:00:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.71 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_cardbus.h" @@ -116,7 +116,7 @@ cardbusmatch(struct device *parent, struct cfdata *cf, void *aux) STATIC void cardbusattach(struct device *parent, struct device *self, void *aux) { - struct cardbus_softc *sc = (void *)self; + struct cardbus_softc *sc = device_private(self); struct cbslot_attach_args *cba = aux; sc->sc_bus = cba->cba_bus; @@ -409,7 +409,7 @@ cardbus_attach_card(struct cardbus_softc *sc) int cardbus_rescan(struct device *self, const char *ifattr, const int *locators) { - struct cardbus_softc *sc = (struct cardbus_softc *)self; + struct cardbus_softc *sc = device_private(self); cardbus_chipset_tag_t cc; cardbus_function_tag_t cf; cardbustag_t tag; @@ -669,7 +669,7 @@ cardbus_detach_card(struct cardbus_softc *sc) void cardbus_childdetached(struct device *self, struct device *child) { - struct cardbus_softc *sc = (struct cardbus_softc *)self; + struct cardbus_softc *sc = device_private(self); struct cardbus_devfunc *ct; ct = sc->sc_funcs[device_locator(child, CARDBUSCF_FUNCTION)]; diff --git a/sys/dev/cardbus/cardslot.c b/sys/dev/cardbus/cardslot.c index 5eac51ee268..d86a7d0e58f 100644 --- a/sys/dev/cardbus/cardslot.c +++ b/sys/dev/cardbus/cardslot.c @@ -1,4 +1,4 @@ -/* $NetBSD: cardslot.c,v 1.30 2006/03/29 04:42:30 thorpej Exp $ */ +/* $NetBSD: cardslot.c,v 1.31 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 1999 and 2000 @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.30 2006/03/29 04:42:30 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.31 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_cardslot.h" @@ -103,7 +103,7 @@ cardslotattach(parent, self, aux) struct device *self; void *aux; { - struct cardslot_softc *sc = (struct cardslot_softc *)self; + struct cardslot_softc *sc = device_private(self); struct cardslot_attach_args *caa = aux; struct cbslot_attach_args *cba = caa->caa_cb_attach; diff --git a/sys/dev/cardbus/com_cardbus.c b/sys/dev/cardbus/com_cardbus.c index a6a83cd3c76..3d1949a17f2 100644 --- a/sys/dev/cardbus/com_cardbus.c +++ b/sys/dev/cardbus/com_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: com_cardbus.c,v 1.16 2006/03/25 22:55:05 thorpej Exp $ */ +/* $NetBSD: com_cardbus.c,v 1.17 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 2000 Johan Danielsson @@ -40,7 +40,7 @@ updated below. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: com_cardbus.c,v 1.16 2006/03/25 22:55:05 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_cardbus.c,v 1.17 2006/03/29 06:22:38 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -205,8 +205,8 @@ gofigure(struct cardbus_attach_args *ca, struct com_cardbus_softc *csc) static void com_cardbus_attach (struct device *parent, struct device *self, void *aux) { - struct com_softc *sc = (struct com_softc*)self; - struct com_cardbus_softc *csc = (struct com_cardbus_softc*)self; + struct com_softc *sc = device_private(self); + struct com_cardbus_softc *csc = device_private(self); struct cardbus_attach_args *ca = aux; csc->cc_ct = ca->ca_ct; @@ -336,9 +336,9 @@ com_cardbus_disable(struct com_softc *sc) static int com_cardbus_detach(struct device *self, int flags) { - struct com_cardbus_softc *csc = (struct com_cardbus_softc *) self; - struct com_softc *sc = (struct com_softc *) self; - struct cardbus_softc *psc = (struct cardbus_softc *)device_parent(self); + struct com_cardbus_softc *csc = device_private(self); + struct com_softc *sc = device_private(self); + struct cardbus_softc *psc = device_private(device_parent(self)); int error; if ((error = com_detach(self, flags)) != 0) diff --git a/sys/dev/cardbus/ehci_cardbus.c b/sys/dev/cardbus/ehci_cardbus.c index 83660909c77..610359a57f7 100644 --- a/sys/dev/cardbus/ehci_cardbus.c +++ b/sys/dev/cardbus/ehci_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_cardbus.c,v 1.13 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: ehci_cardbus.c,v 1.14 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.13 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.14 2006/03/29 06:22:38 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -111,7 +111,7 @@ ehci_cardbus_match(struct device *parent, struct cfdata *match, void *aux) void ehci_cardbus_attach(struct device *parent, struct device *self, void *aux) { - struct ehci_cardbus_softc *sc = (struct ehci_cardbus_softc *)self; + struct ehci_cardbus_softc *sc = device_private(self); struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; cardbus_chipset_tag_t cc = ct->ct_cc; @@ -211,7 +211,7 @@ XXX (ct->ct_cf->cardbus_mem_open)(cc, 0, iob, iob + 0x40); int ehci_cardbus_detach(device_ptr_t self, int flags) { - struct ehci_cardbus_softc *sc = (struct ehci_cardbus_softc *)self; + struct ehci_cardbus_softc *sc = device_private(self); struct cardbus_devfunc *ct = sc->sc_ct; int rv; diff --git a/sys/dev/cardbus/fwohci_cardbus.c b/sys/dev/cardbus/fwohci_cardbus.c index d30047c1a62..f32c5c7c284 100644 --- a/sys/dev/cardbus/fwohci_cardbus.c +++ b/sys/dev/cardbus/fwohci_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: fwohci_cardbus.c,v 1.15 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: fwohci_cardbus.c,v 1.16 2006/03/29 06:22:38 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fwohci_cardbus.c,v 1.15 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fwohci_cardbus.c,v 1.16 2006/03/29 06:22:38 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -99,7 +99,7 @@ static void fwohci_cardbus_attach(struct device *parent, struct device *self, void *aux) { struct cardbus_attach_args *ca = aux; - struct fwohci_cardbus_softc *sc = (struct fwohci_cardbus_softc *)self; + struct fwohci_cardbus_softc *sc = device_private(self); cardbus_devfunc_t ct = ca->ca_ct; cardbus_chipset_tag_t cc = ct->ct_cc; cardbus_function_tag_t cf = ct->ct_cf; @@ -160,7 +160,7 @@ XXX (ct->ct_cf->cardbus_mem_open)(cc, 0, iob, iob + 0x40); int fwohci_cardbus_detach(struct device *self, int flags) { - struct fwohci_cardbus_softc *sc = (struct fwohci_cardbus_softc *)self; + struct fwohci_cardbus_softc *sc = device_private(self); cardbus_devfunc_t ct = sc->sc_ct; int rv; diff --git a/sys/dev/cardbus/if_ath_cardbus.c b/sys/dev/cardbus/if_ath_cardbus.c index 2d529221f20..b03956ea1a9 100644 --- a/sys/dev/cardbus/if_ath_cardbus.c +++ b/sys/dev/cardbus/if_ath_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ath_cardbus.c,v 1.9 2006/03/02 01:24:00 dyoung Exp $ */ +/* $NetBSD: if_ath_cardbus.c,v 1.10 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 2003 * Ichiro FUKUHARA <ichiro@ichiro.org>. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ath_cardbus.c,v 1.9 2006/03/02 01:24:00 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ath_cardbus.c,v 1.10 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -145,7 +145,7 @@ void ath_cardbus_attach(struct device *parent, struct device *self, void *aux) { - struct ath_cardbus_softc *csc = (void *)self; + struct ath_cardbus_softc *csc = device_private(self); struct ath_softc *sc = &csc->sc_ath; struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; @@ -206,7 +206,7 @@ ath_cardbus_attach(struct device *parent, struct device *self, int ath_cardbus_detach(struct device *self, int flags) { - struct ath_cardbus_softc *csc = (void *)self; + struct ath_cardbus_softc *csc = device_private(self); struct ath_softc *sc = &csc->sc_ath; struct cardbus_devfunc *ct = csc->sc_ct; int rv; diff --git a/sys/dev/cardbus/if_atw_cardbus.c b/sys/dev/cardbus/if_atw_cardbus.c index b9e1124f93e..931eab5a67c 100644 --- a/sys/dev/cardbus/if_atw_cardbus.c +++ b/sys/dev/cardbus/if_atw_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_atw_cardbus.c,v 1.13 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: if_atw_cardbus.c,v 1.14 2006/03/29 06:22:38 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2003 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_atw_cardbus.c,v 1.13 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atw_cardbus.c,v 1.14 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -181,7 +181,7 @@ atw_cardbus_match(struct device *parent, struct cfdata *match, void *aux) void atw_cardbus_attach(struct device *parent, struct device *self, void *aux) { - struct atw_cardbus_softc *csc = (void *)self; + struct atw_cardbus_softc *csc = device_private(self); struct atw_softc *sc = &csc->sc_atw; struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; @@ -301,7 +301,7 @@ atw_cardbus_intr_ack(struct atw_softc *sc) int atw_cardbus_detach(struct device *self, int flags) { - struct atw_cardbus_softc *csc = (void *)self; + struct atw_cardbus_softc *csc = device_private(self); struct atw_softc *sc = &csc->sc_atw; struct cardbus_devfunc *ct = csc->sc_ct; int rv; diff --git a/sys/dev/cardbus/if_ex_cardbus.c b/sys/dev/cardbus/if_ex_cardbus.c index 29dea1206a9..c668bff38ac 100644 --- a/sys/dev/cardbus/if_ex_cardbus.c +++ b/sys/dev/cardbus/if_ex_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ex_cardbus.c,v 1.36 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: if_ex_cardbus.c,v 1.37 2006/03/29 06:22:38 thorpej Exp $ */ /* * CardBus specific routines for 3Com 3C575-family CardBus ethernet adapter @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ex_cardbus.c,v 1.36 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ex_cardbus.c,v 1.37 2006/03/29 06:22:38 thorpej Exp $"); /* #define EX_DEBUG 4 */ /* define to report information for debugging */ @@ -225,7 +225,7 @@ ex_cardbus_attach(parent, self, aux) struct device *self; void *aux; { - struct ex_cardbus_softc *csc = (void *)self; + struct ex_cardbus_softc *csc = device_private(self); struct ex_softc *sc = &csc->sc_softc; struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; @@ -326,7 +326,7 @@ ex_cardbus_detach(self, arg) struct device *self; int arg; { - struct ex_cardbus_softc *csc = (void *)self; + struct ex_cardbus_softc *csc = device_private(self); struct ex_softc *sc = &csc->sc_softc; struct cardbus_devfunc *ct = csc->sc_ct; int rv; diff --git a/sys/dev/cardbus/if_fxp_cardbus.c b/sys/dev/cardbus/if_fxp_cardbus.c index 944b1c3d512..52fccdd3d1a 100644 --- a/sys/dev/cardbus/if_fxp_cardbus.c +++ b/sys/dev/cardbus/if_fxp_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_cardbus.c,v 1.22 2006/03/25 22:55:05 thorpej Exp $ */ +/* $NetBSD: if_fxp_cardbus.c,v 1.23 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.22 2006/03/25 22:55:05 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.23 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -144,8 +144,8 @@ fxp_cardbus_attach(parent, self, aux) { static const char thisfunc[] = "fxp_cardbus_attach"; - struct fxp_softc *sc = (struct fxp_softc *) self; - struct fxp_cardbus_softc *csc = (struct fxp_cardbus_softc *) self; + struct fxp_softc *sc = device_private(self); + struct fxp_cardbus_softc *csc = device_private(self); struct cardbus_attach_args *ca = aux; bus_space_tag_t iot, memt; bus_space_handle_t ioh, memh; @@ -273,8 +273,8 @@ fxp_cardbus_detach(self, flags) struct device *self; int flags; { - struct fxp_softc *sc = (struct fxp_softc *) self; - struct fxp_cardbus_softc *csc = (struct fxp_cardbus_softc *) self; + struct fxp_softc *sc = device_private(self); + struct fxp_cardbus_softc *csc = device_private(self); struct cardbus_devfunc *ct = csc->ct; int rv, reg; diff --git a/sys/dev/cardbus/if_ral_cardbus.c b/sys/dev/cardbus/if_ral_cardbus.c index f285f3fe934..0dab902a076 100644 --- a/sys/dev/cardbus/if_ral_cardbus.c +++ b/sys/dev/cardbus/if_ral_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ral_cardbus.c,v 1.3 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: if_ral_cardbus.c,v 1.4 2006/03/29 06:22:38 thorpej Exp $ */ /* $OpenBSD: if_ral_cardbus.c,v 1.5 2005/05/16 01:36:25 brad Exp $ */ /*- @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.3 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.4 2006/03/29 06:22:38 thorpej Exp $"); #include "bpfilter.h" @@ -97,7 +97,7 @@ ral_cardbus_match(struct device *parent, struct cfdata *match, void *aux) void ral_cardbus_attach(struct device *parent, struct device *self, void *aux) { - struct ral_cardbus_softc *csc = (struct ral_cardbus_softc *)self; + struct ral_cardbus_softc *csc = device_private(self); struct ral_softc *sc = &csc->sc_sc; struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; @@ -143,7 +143,7 @@ ral_cardbus_attach(struct device *parent, struct device *self, void *aux) int ral_cardbus_detach(struct device *self, int flags) { - struct ral_cardbus_softc *csc = (struct ral_cardbus_softc *)self; + struct ral_cardbus_softc *csc = device_private(self); struct ral_softc *sc = &csc->sc_sc; cardbus_devfunc_t ct = csc->sc_ct; cardbus_chipset_tag_t cc = ct->ct_cc; diff --git a/sys/dev/cardbus/if_re_cardbus.c b/sys/dev/cardbus/if_re_cardbus.c index 7ad360f1079..a67ffa54418 100644 --- a/sys/dev/cardbus/if_re_cardbus.c +++ b/sys/dev/cardbus/if_re_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_re_cardbus.c,v 1.6 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: if_re_cardbus.c,v 1.7 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 2004 Jonathan Stone @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_re_cardbus.c,v 1.6 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_re_cardbus.c,v 1.7 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -169,7 +169,7 @@ re_cardbus_match(struct device *parent, struct cfdata *match, void *aux) void re_cardbus_attach(struct device *parent, struct device *self, void *aux) { - struct re_cardbus_softc *csc = (struct re_cardbus_softc *)self; + struct re_cardbus_softc *csc = device_private(self); struct rtk_softc *sc = &csc->sc_rtk; struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; @@ -248,7 +248,7 @@ re_cardbus_attach(struct device *parent, struct device *self, void *aux) int re_cardbus_detach(struct device *self, int flags) { - struct re_cardbus_softc *csc = (void *) self; + struct re_cardbus_softc *csc = device_private(self); struct rtk_softc *sc = &csc->sc_rtk; struct cardbus_devfunc *ct = csc->sc_ct; int rv; diff --git a/sys/dev/cardbus/if_rtk_cardbus.c b/sys/dev/cardbus/if_rtk_cardbus.c index eaa6525afed..1e6d4255b49 100644 --- a/sys/dev/cardbus/if_rtk_cardbus.c +++ b/sys/dev/cardbus/if_rtk_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_rtk_cardbus.c,v 1.26 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: if_rtk_cardbus.c,v 1.27 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 2000 Masanori Kanaoka @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_rtk_cardbus.c,v 1.26 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_rtk_cardbus.c,v 1.27 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -190,7 +190,7 @@ rtk_cardbus_attach(parent, self, aux) struct device *parent, *self; void *aux; { - struct rtk_cardbus_softc *csc = (struct rtk_cardbus_softc *)self; + struct rtk_cardbus_softc *csc = device_private(self); struct rtk_softc *sc = &csc->sc_rtk; struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; @@ -270,7 +270,7 @@ rtk_cardbus_detach(self, flags) struct device *self; int flags; { - struct rtk_cardbus_softc *csc = (void *) self; + struct rtk_cardbus_softc *csc = device_private(self); struct rtk_softc *sc = &csc->sc_rtk; struct cardbus_devfunc *ct = csc->sc_ct; int rv; diff --git a/sys/dev/cardbus/if_rtw_cardbus.c b/sys/dev/cardbus/if_rtw_cardbus.c index 10a6439eef7..80ea89def50 100644 --- a/sys/dev/cardbus/if_rtw_cardbus.c +++ b/sys/dev/cardbus/if_rtw_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_rtw_cardbus.c,v 1.9 2005/12/29 22:41:16 dyoung Exp $ */ +/* $NetBSD: if_rtw_cardbus.c,v 1.10 2006/03/29 06:22:38 thorpej Exp $ */ /*- * Copyright (c) 2004, 2005 David Young. All rights reserved. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_rtw_cardbus.c,v 1.9 2005/12/29 22:41:16 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_rtw_cardbus.c,v 1.10 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -240,7 +240,7 @@ rtw_cardbus_attach(parent, self, aux) struct device *parent, *self; void *aux; { - struct rtw_cardbus_softc *csc = (void *)self; + struct rtw_cardbus_softc *csc = device_private(self); struct rtw_softc *sc = &csc->sc_rtw; struct rtw_regs *regs = &sc->sc_regs; struct cardbus_attach_args *ca = aux; @@ -348,7 +348,7 @@ rtw_cardbus_detach(self, flags) struct device *self; int flags; { - struct rtw_cardbus_softc *csc = (void *)self; + struct rtw_cardbus_softc *csc = device_private(self); struct rtw_softc *sc = &csc->sc_rtw; struct rtw_regs *regs = &sc->sc_regs; struct cardbus_devfunc *ct = csc->sc_ct; diff --git a/sys/dev/cardbus/if_tlp_cardbus.c b/sys/dev/cardbus/if_tlp_cardbus.c index a2ea24e9376..365409b653e 100644 --- a/sys/dev/cardbus/if_tlp_cardbus.c +++ b/sys/dev/cardbus/if_tlp_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_cardbus.c,v 1.48 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: if_tlp_cardbus.c,v 1.49 2006/03/29 06:22:38 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tlp_cardbus.c,v 1.48 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tlp_cardbus.c,v 1.49 2006/03/29 06:22:38 thorpej Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -252,7 +252,7 @@ tlp_cardbus_attach(parent, self, aux) struct device *parent, *self; void *aux; { - struct tulip_cardbus_softc *csc = (void *)self; + struct tulip_cardbus_softc *csc = device_private(self); struct tulip_softc *sc = &csc->sc_tulip; struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; @@ -491,7 +491,7 @@ tlp_cardbus_detach(self, flags) struct device *self; int flags; { - struct tulip_cardbus_softc *csc = (void *)self; + struct tulip_cardbus_softc *csc = device_private(self); struct tulip_softc *sc = &csc->sc_tulip; struct cardbus_devfunc *ct = csc->sc_ct; int rv; diff --git a/sys/dev/cardbus/rbus_ppb.c b/sys/dev/cardbus/rbus_ppb.c index 2c2c27d9fcb..0146231fe17 100644 --- a/sys/dev/cardbus/rbus_ppb.c +++ b/sys/dev/cardbus/rbus_ppb.c @@ -1,4 +1,4 @@ -/* $NetBSD: rbus_ppb.c,v 1.18 2006/03/25 22:55:05 thorpej Exp $ */ +/* $NetBSD: rbus_ppb.c,v 1.19 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.18 2006/03/25 22:55:05 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.19 2006/03/29 06:22:38 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -658,9 +658,9 @@ ppb_cardbus_attach(parent, self, aux) struct device *parent, *self; void *aux; { - struct ppb_cardbus_softc *csc = (struct ppb_cardbus_softc *) self; + struct ppb_cardbus_softc *csc = device_private(self); struct cardbus_softc *parent_sc = - (struct cardbus_softc *) device_parent(&csc->sc_dev); + device_private(device_parent(&csc->sc_dev)); struct cardbus_attach_args *ca = aux; cardbus_devfunc_t ct = ca->ca_ct; cardbus_chipset_tag_t cc = ct->ct_cc; @@ -858,8 +858,8 @@ ppb_cardbus_detach(self, flags) struct device *self; int flags; { - /* struct ppb_softc *sc = (struct ppb_softc *) self;*/ - struct ppb_cardbus_softc *csc = (struct ppb_cardbus_softc *) self; + /* struct ppb_softc *sc = device_private(self);*/ + struct ppb_cardbus_softc *csc = device_private(self); #if 0 struct cardbus_devfunc *ct = csc->ct; diff --git a/sys/dev/cardbus/uhci_cardbus.c b/sys/dev/cardbus/uhci_cardbus.c index 37dae52a008..2998b96cc67 100644 --- a/sys/dev/cardbus/uhci_cardbus.c +++ b/sys/dev/cardbus/uhci_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci_cardbus.c,v 1.2 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: uhci_cardbus.c,v 1.3 2006/03/29 06:22:38 thorpej Exp $ */ /* * Copyright (c) 1998-2005 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.2 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.3 2006/03/29 06:22:38 thorpej Exp $"); #include "ehci_cardbus.h" @@ -102,7 +102,7 @@ uhci_cardbus_match(struct device *parent, struct cfdata *match, void *aux) static void uhci_cardbus_attach(struct device *parent, struct device *self, void *aux) { - struct uhci_cardbus_softc *sc = (struct uhci_cardbus_softc *)self; + struct uhci_cardbus_softc *sc = device_private(self); struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; cardbus_devfunc_t ct = ca->ca_ct; cardbus_chipset_tag_t cc = ct->ct_cc; @@ -205,7 +205,7 @@ XXX (ct->ct_cf->cardbus_io_open)(cc, 0, iob, iob + 0x40); static int uhci_cardbus_detach(device_ptr_t self, int flags) { - struct uhci_cardbus_softc *sc = (struct uhci_cardbus_softc *)self; + struct uhci_cardbus_softc *sc = device_private(self); struct cardbus_devfunc *ct = sc->sc_ct; int rv; |
