Use device_private().

This commit is contained in:
thorpej 2006-03-29 18:17:36 +00:00
parent 2f48a02e05
commit ceb94256d6
12 changed files with 39 additions and 39 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dhu.c,v 1.41 2005/12/11 23:17:10 christos Exp $ */
/* $NetBSD: dhu.c,v 1.42 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 2003, Hugh Graham.
* Copyright (c) 1992, 1993
@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.41 2005/12/11 23:17:10 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.42 2006/03/29 18:17:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -243,7 +243,7 @@ dhu_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
struct dhu_softc *sc = (void *)self;
struct dhu_softc *sc = device_private(self);
struct uba_attach_args *ua = aux;
unsigned c;
int n, i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dl.c,v 1.31 2005/12/11 12:23:29 christos Exp $ */
/* $NetBSD: dl.c,v 1.32 2006/03/29 18:17:36 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.31 2005/12/11 12:23:29 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.32 2006/03/29 18:17:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -237,7 +237,7 @@ dl_match (struct device *parent, struct cfdata *cf, void *aux)
static void
dl_attach (struct device *parent, struct device *self, void *aux)
{
struct dl_softc *sc = (void *)self;
struct dl_softc *sc = device_private(self);
struct uba_attach_args *ua = aux;
sc->sc_iot = ua->ua_iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dz_uba.c,v 1.23 2005/12/11 12:23:29 christos Exp $ */
/* $NetBSD: dz_uba.c,v 1.24 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden. All rights reserved.
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dz_uba.c,v 1.23 2005/12/11 12:23:29 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: dz_uba.c,v 1.24 2006/03/29 18:17:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -114,7 +114,7 @@ dz_uba_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
struct dz_softc *sc = (void *)self;
struct dz_softc *sc = device_private(self);
struct uba_attach_args *ua = aux;
sc->sc_iot = ua->ua_iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_de.c,v 1.19 2006/03/25 04:08:45 thorpej Exp $ */
/* $NetBSD: if_de.c,v 1.20 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1989 Regents of the University of California.
@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.19 2006/03/25 04:08:45 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.20 2006/03/29 18:17:36 thorpej Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -209,7 +209,7 @@ void
deattach(struct device *parent, struct device *self, void *aux)
{
struct uba_attach_args *ua = aux;
struct de_softc *sc = (struct de_softc *)self;
struct de_softc *sc = device_private(self);
struct ifnet *ifp = &sc->sc_if;
u_int8_t myaddr[ETHER_ADDR_LEN];
int csr1, error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_dmc.c,v 1.12 2006/03/29 04:16:50 thorpej Exp $ */
/* $NetBSD: if_dmc.c,v 1.13 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.12 2006/03/29 04:16:50 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.13 2006/03/29 18:17:36 thorpej Exp $");
#undef DMCDEBUG /* for base table dump on fatal error */
@ -250,7 +250,7 @@ void
dmcattach(struct device *parent, struct device *self, void *aux)
{
struct uba_attach_args *ua = aux;
struct dmc_softc *sc = (struct dmc_softc *)self;
struct dmc_softc *sc = device_private(self);
sc->sc_iot = ua->ua_iot;
sc->sc_ioh = ua->ua_ioh;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_il.c,v 1.13 2006/03/25 04:08:45 thorpej Exp $ */
/* $NetBSD: if_il.c,v 1.14 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_il.c,v 1.13 2006/03/25 04:08:45 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_il.c,v 1.14 2006/03/29 18:17:36 thorpej Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@ -161,7 +161,7 @@ void
ilattach(struct device *parent, struct device *self, void *aux)
{
struct uba_attach_args *ua = aux;
struct il_softc *sc = (struct il_softc *)self;
struct il_softc *sc = device_private(self);
struct ifnet *ifp = &sc->sc_if;
int error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_qe.c,v 1.60 2005/12/11 12:23:29 christos Exp $ */
/* $NetBSD: if_qe.c,v 1.61 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
*
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.60 2005/12/11 12:23:29 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.61 2006/03/29 18:17:36 thorpej Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -213,7 +213,7 @@ qeattach(struct device *parent, struct device *self, void *aux)
{
struct uba_attach_args *ua = aux;
struct uba_softc *ubasc = (struct uba_softc *)parent;
struct qe_softc *sc = (struct qe_softc *)self;
struct qe_softc *sc = device_private(self);
struct ifnet *ifp = (struct ifnet *)&sc->sc_if;
struct qe_ring *rp;
u_int8_t enaddr[ETHER_ADDR_LEN];

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_qt.c,v 1.8 2006/03/25 04:08:45 thorpej Exp $ */
/* $NetBSD: if_qt.c,v 1.9 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 1992 Steven M. Schultz
* All rights reserved.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_qt.c,v 1.8 2006/03/25 04:08:45 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_qt.c,v 1.9 2006/03/29 18:17:36 thorpej Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -258,7 +258,7 @@ void
qtattach(struct device *parent, struct device *self, void *aux)
{
struct uba_softc *ubasc = (struct uba_softc *)parent;
register struct qt_softc *sc = (struct qt_softc *)self;
register struct qt_softc *sc = device_private(self);
register struct ifnet *ifp = &sc->is_if;
struct uba_attach_args *ua = aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf.c,v 1.11 2006/03/25 04:08:45 thorpej Exp $ */
/* $NetBSD: rf.c,v 1.12 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 2002 Jochen Kunz.
* All rights reserved.
@ -36,7 +36,7 @@ TODO:
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.11 2006/03/25 04:08:45 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.12 2006/03/29 18:17:36 thorpej Exp $");
/* autoconfig stuff */
#include <sys/param.h>
@ -330,7 +330,7 @@ rfcprobedens(struct rfc_softc *rfc_sc, int dnum)
void
rfc_attach(struct device *parent, struct device *self, void *aux)
{
struct rfc_softc *rfc_sc = (struct rfc_softc *)self;
struct rfc_softc *rfc_sc = device_private(self);
struct uba_attach_args *ua = aux;
struct rfc_attach_args rfc_aa;
int i;
@ -444,7 +444,7 @@ rf_match(struct device *parent, struct cfdata *match, void *aux)
void
rf_attach(struct device *parent, struct device *self, void *aux)
{
struct rf_softc *rf_sc = (struct rf_softc *)self;
struct rf_softc *rf_sc = device_private(self);
struct rfc_attach_args *rfc_aa = (struct rfc_attach_args *)aux;
struct rfc_softc *rfc_sc;
struct disklabel *dl;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rl.c,v 1.29 2006/03/28 17:38:34 thorpej Exp $ */
/* $NetBSD: rl.c,v 1.30 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.29 2006/03/28 17:38:34 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.30 2006/03/29 18:17:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -194,7 +194,7 @@ rlcmatch(struct device *parent, struct cfdata *cf, void *aux)
void
rlcattach(struct device *parent, struct device *self, void *aux)
{
struct rlc_softc *sc = (struct rlc_softc *)self;
struct rlc_softc *sc = device_private(self);
struct uba_attach_args *ua = aux;
struct rlc_attach_args ra;
int i, error;
@ -248,7 +248,7 @@ rlmatch(struct device *parent, struct cfdata *cf, void *aux)
void
rlattach(struct device *parent, struct device *self, void *aux)
{
struct rl_softc *rc = (struct rl_softc *)self;
struct rl_softc *rc = device_private(self);
struct rlc_attach_args *ra = aux;
struct disklabel *dl;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ts.c,v 1.16 2006/03/25 04:08:45 thorpej Exp $ */
/* $NetBSD: ts.c,v 1.17 2006/03/29 18:17:36 thorpej Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ts.c,v 1.16 2006/03/25 04:08:45 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ts.c,v 1.17 2006/03/29 18:17:36 thorpej Exp $");
#undef TSDEBUG
@ -231,8 +231,8 @@ tsmatch(struct device *parent, struct cfdata *match, void *aux)
void
tsattach(struct device *parent, struct device *self, void *aux)
{
struct uba_softc *uh = (void *)parent;
struct ts_softc *sc = (void *)self;
struct uba_softc *uh = device_private(parent);
struct ts_softc *sc = device_private(self);
struct uba_attach_args *ua = aux;
int error;
char *t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uda.c,v 1.55 2006/03/25 23:24:19 thorpej Exp $ */
/* $NetBSD: uda.c,v 1.56 2006/03/29 18:17:36 thorpej Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uda.c,v 1.55 2006/03/25 23:24:19 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: uda.c,v 1.56 2006/03/29 18:17:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -201,7 +201,7 @@ bad:
void
udaattach(struct device *parent, struct device *self, void *aux)
{
struct uda_softc *sc = (void *)self;
struct uda_softc *sc = device_private(self);
struct uba_attach_args *ua = aux;
struct uba_softc *uh = (void *)parent;
struct mscp_attach_args ma;