summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-07-01 10:45:02 +0000
committerharti <harti@FreeBSD.org>2005-07-01 10:45:02 +0000
commitabe7cea16b1e12670e6e9c740ae48688440ce7e6 (patch)
treea3f8b55d445efe6a695d631e2472f56742fe4dbb /sys
parente8f7047163a6b4a9a0d79437f988e894ce22b9b2 (diff)
downloadFreeBSD-src-abe7cea16b1e12670e6e9c740ae48688440ce7e6.zip
FreeBSD-src-abe7cea16b1e12670e6e9c740ae48688440ce7e6.tar.gz
Fix another fallout from the ifnet change that assumed that a softc
starts with an ifatm which in turns has an ifnet. Remove also a couple of unneccessary casts that could hide such things in the future. Approved by: re
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fatm/if_fatm.c4
-rw-r--r--sys/dev/hatm/if_hatm.c6
-rw-r--r--sys/dev/hatm/if_hatm_ioctl.c2
-rw-r--r--sys/dev/hatm/if_hatm_tx.c2
-rw-r--r--sys/dev/patm/if_patm_attach.c2
-rw-r--r--sys/dev/patm/if_patm_tx.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c
index 4842db4..25c2f78 100644
--- a/sys/dev/fatm/if_fatm.c
+++ b/sys/dev/fatm/if_fatm.c
@@ -2054,7 +2054,7 @@ fatm_start(struct ifnet *ifp)
u_int mlen, vpi, vci;
struct card_vcc *vc;
- sc = (struct fatm_softc *)ifp->if_softc;
+ sc = ifp->if_softc;
while (1) {
IF_DEQUEUE(&ifp->if_snd, m);
@@ -2544,7 +2544,7 @@ fatm_detach(device_t dev)
struct fatm_softc *sc;
struct txqueue *tx;
- sc = (struct fatm_softc *)device_get_softc(dev);
+ sc = device_get_softc(dev);
if (device_is_alive(dev)) {
FATM_LOCK(sc);
diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c
index 8811b4e..16740f0 100644
--- a/sys/dev/hatm/if_hatm.c
+++ b/sys/dev/hatm/if_hatm.c
@@ -1575,7 +1575,7 @@ static int
hatm_utopia_readregs(struct ifatm *ifatm, u_int reg, uint8_t *val, u_int *n)
{
u_int i;
- struct hatm_softc *sc = (struct hatm_softc *)ifatm;
+ struct hatm_softc *sc = ifatm->ifp->if_softc;
if (reg >= (HE_REGO_SUNI_END - HE_REGO_SUNI) / 4)
return (EINVAL);
@@ -1596,7 +1596,7 @@ static int
hatm_utopia_writereg(struct ifatm *ifatm, u_int reg, u_int mask, u_int val)
{
uint32_t regval;
- struct hatm_softc *sc = (struct hatm_softc *)ifatm;
+ struct hatm_softc *sc = ifatm->ifp->if_softc;
if (reg >= (HE_REGO_SUNI_END - HE_REGO_SUNI) / 4)
return (EINVAL);
@@ -1620,7 +1620,7 @@ static struct utopia_methods hatm_utopia_methods = {
static int
hatm_detach(device_t dev)
{
- struct hatm_softc *sc = (struct hatm_softc *)device_get_softc(dev);
+ struct hatm_softc *sc = device_get_softc(dev);
mtx_lock(&sc->mtx);
hatm_stop(sc);
diff --git a/sys/dev/hatm/if_hatm_ioctl.c b/sys/dev/hatm/if_hatm_ioctl.c
index cb8d652..0a4724a 100644
--- a/sys/dev/hatm/if_hatm_ioctl.c
+++ b/sys/dev/hatm/if_hatm_ioctl.c
@@ -275,7 +275,7 @@ hatm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct ifreq *ifr = (struct ifreq *)data;
struct ifaddr *ifa = (struct ifaddr *)data;
- struct hatm_softc *sc = (struct hatm_softc *)ifp->if_softc;
+ struct hatm_softc *sc = ifp->if_softc;
struct atmio_vcctable *vtab;
int error = 0;
diff --git a/sys/dev/hatm/if_hatm_tx.c b/sys/dev/hatm/if_hatm_tx.c
index 87baf09..7e2676a 100644
--- a/sys/dev/hatm/if_hatm_tx.c
+++ b/sys/dev/hatm/if_hatm_tx.c
@@ -351,7 +351,7 @@ hatm_load_txbuf(void *uarg, bus_dma_segment_t *segs, int nseg,
void
hatm_start(struct ifnet *ifp)
{
- struct hatm_softc *sc = (struct hatm_softc *)ifp->if_softc;
+ struct hatm_softc *sc = ifp->if_softc;
struct mbuf *m;
struct atm_pseudohdr *aph;
u_int cid;
diff --git a/sys/dev/patm/if_patm_attach.c b/sys/dev/patm/if_patm_attach.c
index 1b4e0c2..884f16c 100644
--- a/sys/dev/patm/if_patm_attach.c
+++ b/sys/dev/patm/if_patm_attach.c
@@ -465,7 +465,7 @@ patm_detach(device_t dev)
{
struct patm_softc *sc;
- sc = (struct patm_softc *)device_get_softc(dev);
+ sc = device_get_softc(dev);
mtx_lock(&sc->mtx);
patm_stop(sc);
diff --git a/sys/dev/patm/if_patm_tx.c b/sys/dev/patm/if_patm_tx.c
index 975f56a..887e2d5 100644
--- a/sys/dev/patm/if_patm_tx.c
+++ b/sys/dev/patm/if_patm_tx.c
@@ -282,7 +282,7 @@ patm_tx_vcc_closed(struct patm_softc *sc, struct patm_vcc *vcc)
void
patm_start(struct ifnet *ifp)
{
- struct patm_softc *sc = (struct patm_softc *)ifp->if_softc;
+ struct patm_softc *sc = ifp->if_softc;
struct mbuf *m;
struct atm_pseudohdr *aph;
u_int vpi, vci, cid;
OpenPOWER on IntegriCloud