aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vge
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2009-12-14 18:00:08 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2009-12-14 18:00:08 +0000
commit481402e1971f61374c27d29ae61978fc29b52605 (patch)
tree0e8d346f5224509c4082a62bd09aa0d057237847 /sys/dev/vge
parentb534dcd5c022757e75b933394b137bf4806cc961 (diff)
Notes
Diffstat (limited to 'sys/dev/vge')
-rw-r--r--sys/dev/vge/if_vge.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c
index 3d41f41beda8..6d83aed2435b 100644
--- a/sys/dev/vge/if_vge.c
+++ b/sys/dev/vge/if_vge.c
@@ -918,10 +918,9 @@ vge_attach(dev)
u_char eaddr[ETHER_ADDR_LEN];
struct vge_softc *sc;
struct ifnet *ifp;
- int unit, error = 0, rid;
+ int error = 0, rid;
sc = device_get_softc(dev);
- unit = device_get_unit(dev);
sc->vge_dev = dev;
mtx_init(&sc->vge_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
@@ -938,7 +937,7 @@ vge_attach(dev)
0, ~0, 1, RF_ACTIVE);
if (sc->vge_res == NULL) {
- printf ("vge%d: couldn't map ports/memory\n", unit);
+ device_printf(dev, "couldn't map ports/memory\n");
error = ENXIO;
goto fail;
}
@@ -949,7 +948,7 @@ vge_attach(dev)
0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
if (sc->vge_irq == NULL) {
- printf("vge%d: couldn't map interrupt\n", unit);
+ device_printf(dev, "couldn't map interrupt\n");
error = ENXIO;
goto fail;
}
@@ -1027,7 +1026,7 @@ vge_attach(dev)
NULL, vge_intr, sc, &sc->vge_intrhand);
if (error) {
- printf("vge%d: couldn't set up irq\n", unit);
+ device_printf(dev, "couldn't set up irq\n");
ether_ifdetach(ifp);
goto fail;
}