diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2008-05-05 01:37:56 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2008-05-05 01:37:56 +0000 |
| commit | 44b2bb4cfa3e021c49c7076c37cd0d28a5259685 (patch) | |
| tree | 68612aeb554195dba3b14518c0c9a24635e517e9 /sys/dev | |
| parent | 104f8564ec9d9324d3e441364fb4a50aab1e8441 (diff) | |
Use device_private() where appropriate.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/mii/gphyter.c | 6 | ||||
| -rw-r--r-- | sys/dev/mii/mii.c | 8 | ||||
| -rw-r--r-- | sys/dev/mii/nsphyter.c | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/mii/gphyter.c b/sys/dev/mii/gphyter.c index 2856c4a2f63..cd223d3f65c 100644 --- a/sys/dev/mii/gphyter.c +++ b/sys/dev/mii/gphyter.c @@ -1,4 +1,4 @@ -/* $NetBSD: gphyter.c,v 1.24 2008/05/04 17:06:09 xtraeme Exp $ */ +/* $NetBSD: gphyter.c,v 1.25 2008/05/05 01:37:56 tsutsui Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gphyter.c,v 1.24 2008/05/04 17:06:09 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gphyter.c,v 1.25 2008/05/05 01:37:56 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -125,7 +125,7 @@ gphytermatch(device_t parent, cfdata_t match, void *aux) static void gphyterattach(device_t parent, device_t 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.c b/sys/dev/mii/mii.c index 62e9c3f994c..aa3ad648f06 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -1,4 +1,4 @@ -/* $NetBSD: mii.c,v 1.47 2008/05/04 17:06:09 xtraeme Exp $ */ +/* $NetBSD: mii.c,v 1.48 2008/05/05 01:37:56 tsutsui Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.47 2008/05/04 17:06:09 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.48 2008/05/05 01:37:56 tsutsui Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -135,8 +135,8 @@ mii_attach(device_t parent, struct mii_data *mii, int capmask, locs[MIICF_PHY] = ma.mii_phyno; - child = (struct mii_softc *)config_found_sm_loc(parent, "mii", - locs, &ma, mii_print, config_stdsubmatch); + child = device_private(config_found_sm_loc(parent, "mii", + locs, &ma, mii_print, config_stdsubmatch)); if (child) { /* * Link it up in the parent's MII data. diff --git a/sys/dev/mii/nsphyter.c b/sys/dev/mii/nsphyter.c index 6593a3aaacb..b166e0a7e30 100644 --- a/sys/dev/mii/nsphyter.c +++ b/sys/dev/mii/nsphyter.c @@ -1,4 +1,4 @@ -/* $NetBSD: nsphyter.c,v 1.31 2008/05/04 17:06:10 xtraeme Exp $ */ +/* $NetBSD: nsphyter.c,v 1.32 2008/05/05 01:37:56 tsutsui Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v 1.31 2008/05/04 17:06:10 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v 1.32 2008/05/05 01:37:56 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -128,7 +128,7 @@ nsphytermatch(device_t parent, cfdata_t match, void *aux) static void nsphyterattach(device_t parent, device_t 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; |
