Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/mii Use device_private() instead of casting softc to...



details:   https://anonhg.NetBSD.org/src/rev/262345bd4099
branches:  trunk
changeset: 759071:262345bd4099
user:      jym <jym%NetBSD.org@localhost>
date:      Sat Nov 27 17:42:04 2010 +0000

description:
Use device_private() instead of casting softc to (void *).

diffstat:

 sys/dev/mii/brgphy.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 1f72cdb29a18 -r 262345bd4099 sys/dev/mii/brgphy.c
--- a/sys/dev/mii/brgphy.c      Sat Nov 27 17:38:49 2010 +0000
+++ b/sys/dev/mii/brgphy.c      Sat Nov 27 17:42:04 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: brgphy.c,v 1.55 2010/05/02 13:49:17 pgoyette Exp $     */
+/*     $NetBSD: brgphy.c,v 1.56 2010/11/27 17:42:04 jym Exp $  */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.55 2010/05/02 13:49:17 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.56 2010/11/27 17:42:04 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -519,7 +519,7 @@
 static void
 brgphy_reset(struct mii_softc *sc)
 {
-       struct brgphy_softc *bsc = (void *)sc;
+       struct brgphy_softc *bsc = device_private(sc->mii_dev);
 
        mii_phy_reset(sc);
 



Home | Main Index | Thread Index | Old Index