From 44b2bb4cfa3e021c49c7076c37cd0d28a5259685 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Mon, 5 May 2008 01:37:56 +0000 Subject: Use device_private() where appropriate. --- sys/dev/mii/gphyter.c | 6 +++--- sys/dev/mii/mii.c | 8 ++++---- sys/dev/mii/nsphyter.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'sys/dev') 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 -__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 #include @@ -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 -__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 #include @@ -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 -__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 #include @@ -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; -- cgit