Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Dec 2010 16:57:30 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216764 - head/sys/dev/mpt
Message-ID:  <201012281657.oBSGvUPO067723@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Dec 28 16:57:29 2010
New Revision: 216764
URL: http://svn.freebsd.org/changeset/base/216764

Log:
  Use bus_alloc_resource_any().
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/mpt/mpt_pci.c

Modified: head/sys/dev/mpt/mpt_pci.c
==============================================================================
--- head/sys/dev/mpt/mpt_pci.c	Tue Dec 28 14:58:08 2010	(r216763)
+++ head/sys/dev/mpt/mpt_pci.c	Tue Dec 28 16:57:29 2010	(r216764)
@@ -523,8 +523,8 @@ mpt_pci_attach(device_t dev)
 	 * some cards otherwise).
 	 */
 	mpt->pci_pio_rid = PCIR_BAR(mpt_io_bar);
-	mpt->pci_pio_reg = bus_alloc_resource(dev, SYS_RES_IOPORT,
-			    &mpt->pci_pio_rid, 0, ~0, 0, RF_ACTIVE);
+	mpt->pci_pio_reg = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
+			    &mpt->pci_pio_rid, RF_ACTIVE);
 	if (mpt->pci_pio_reg == NULL) {
 		device_printf(dev, "unable to map registers in PIO mode\n");
 		goto bad;
@@ -534,8 +534,8 @@ mpt_pci_attach(device_t dev)
 
 	/* Allocate kernel virtual memory for the 9x9's Mem0 region */
 	mpt->pci_mem_rid = PCIR_BAR(mpt_mem_bar);
-	mpt->pci_reg = bus_alloc_resource(dev, SYS_RES_MEMORY,
-			&mpt->pci_mem_rid, 0, ~0, 0, RF_ACTIVE);
+	mpt->pci_reg = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
+			&mpt->pci_mem_rid, RF_ACTIVE);
 	if (mpt->pci_reg == NULL) {
 		device_printf(dev, "Unable to memory map registers.\n");
 		if (mpt->is_sas) {



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