Date: Mon, 14 Dec 2009 18:00:08 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r200520 - head/sys/dev/vge Message-ID: <200912141800.nBEI08I3033621@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Mon Dec 14 18:00:08 2009 New Revision: 200520 URL: http://svn.freebsd.org/changeset/base/200520 Log: Prefer device_printf(9) to printf(9). Modified: head/sys/dev/vge/if_vge.c Modified: head/sys/dev/vge/if_vge.c ============================================================================== --- head/sys/dev/vge/if_vge.c Mon Dec 14 17:53:10 2009 (r200519) +++ head/sys/dev/vge/if_vge.c Mon Dec 14 18:00:08 2009 (r200520) @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912141800.nBEI08I3033621>