From 7b9a15f73c414ea3a51b002cbd29685fe19a8c3b Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Mon, 27 Sep 2010 20:31:03 +0000 Subject: Use the mii_data provided via mii_attach_args and mii_pdata respectively instead of reaching out for the softc of the parent. --- sys/dev/dc/dcphy.c | 2 +- sys/dev/dc/pnphy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/dc') diff --git a/sys/dev/dc/dcphy.c b/sys/dev/dc/dcphy.c index a4df704316e0..031b1e5d1e7e 100644 --- a/sys/dev/dc/dcphy.c +++ b/sys/dev/dc/dcphy.c @@ -146,7 +146,7 @@ dcphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; diff --git a/sys/dev/dc/pnphy.c b/sys/dev/dc/pnphy.c index d1282a78c6f5..187089e0eab2 100644 --- a/sys/dev/dc/pnphy.c +++ b/sys/dev/dc/pnphy.c @@ -129,7 +129,7 @@ pnphy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); sc->mii_dev = device_get_parent(dev); - mii = device_get_softc(sc->mii_dev); + mii = ma->mii_data; LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); sc->mii_inst = mii->mii_instance; -- cgit v1.3