Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Apr 2010 17:58:47 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r206191 - stable/8/sys/sparc64/pci
Message-ID:  <201004051758.o35HwlrU001773@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Mon Apr  5 17:58:47 2010
New Revision: 206191
URL: http://svn.freebsd.org/changeset/base/206191

Log:
  MFC: r206019
  
  Don't re-implement device_get_nameunit(9).

Modified:
  stable/8/sys/sparc64/pci/apb.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/sparc64/pci/apb.c
==============================================================================
--- stable/8/sys/sparc64/pci/apb.c	Mon Apr  5 17:58:47 2010	(r206190)
+++ stable/8/sys/sparc64/pci/apb.c	Mon Apr  5 17:58:47 2010	(r206191)
@@ -223,8 +223,7 @@ apb_alloc_resource(device_t dev, device_
 	 */
 	if (start == 0 && end == ~0) {
 		device_printf(dev, "can't decode default resource id %d for "
-		    "%s%d, bypassing\n", *rid, device_get_name(child),
-		    device_get_unit(child));
+		    "%s, bypassing\n", *rid, device_get_nameunit(child));
 		goto passup;
 	}
 
@@ -236,31 +235,28 @@ apb_alloc_resource(device_t dev, device_
 	switch (type) {
 	case SYS_RES_IOPORT:
 		if (!apb_checkrange(sc->sc_iomap, APB_IO_SCALE, start, end)) {
-			device_printf(dev, "device %s%d requested unsupported "
-			    "I/O range 0x%lx-0x%lx\n", device_get_name(child),
-			    device_get_unit(child), start, end);
+			device_printf(dev, "device %s requested unsupported "
+			    "I/O range 0x%lx-0x%lx\n",
+			    device_get_nameunit(child), start, end);
 			return (NULL);
 		}
 		if (bootverbose)
 			device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device "
-			    "%s%d requested decoded I/O range 0x%lx-0x%lx\n",
-			    device_get_name(child), device_get_unit(child),
-			    start, end);
+			    "%s requested decoded I/O range 0x%lx-0x%lx\n",
+			    device_get_nameunit(child), start, end);
 		break;
 
 	case SYS_RES_MEMORY:
 		if (!apb_checkrange(sc->sc_memmap, APB_MEM_SCALE, start, end)) {
-			device_printf(dev, "device %s%d requested unsupported "
+			device_printf(dev, "device %s requested unsupported "
 			    "memory range 0x%lx-0x%lx\n",
-			    device_get_name(child), device_get_unit(child),
-			    start, end);
+			    device_get_nameunit(child), start, end);
 			return (NULL);
 		}
 		if (bootverbose)
 			device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device "
-			    "%s%d requested decoded memory range 0x%lx-0x%lx\n",
-			    device_get_name(child), device_get_unit(child),
-			    start, end);
+			    "%s requested decoded memory range 0x%lx-0x%lx\n",
+			    device_get_nameunit(child), start, end);
 		break;
 
 	default:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004051758.o35HwlrU001773>