Date: Thu, 5 Sep 2013 23:02:43 +0000 (UTC) From: Carl Delsey <carl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255275 - head/sys/dev/ntb/ntb_hw Message-ID: <201309052302.r85N2hrB079158@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: carl Date: Thu Sep 5 23:02:43 2013 New Revision: 255275 URL: http://svnweb.freebsd.org/changeset/base/255275 Log: Simplifying bus alloc resource call since we only need the default values. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:00:59 2013 (r255274) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:02:43 2013 (r255275) @@ -340,8 +340,8 @@ static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) { - bar->pci_resource = bus_alloc_resource(ntb->device, SYS_RES_MEMORY, - &bar->pci_resource_id, 0, ~0, 1, RF_ACTIVE); + bar->pci_resource = bus_alloc_resource_any(ntb->device, SYS_RES_MEMORY, + &bar->pci_resource_id, RF_ACTIVE); if (bar->pci_resource == NULL) return (ENXIO); @@ -356,9 +356,8 @@ map_memory_window_bar(struct ntb_softc * { int rc; - bar->pci_resource = bus_alloc_resource(ntb->device, - SYS_RES_MEMORY, &bar->pci_resource_id, 0, ~0, 1, - RF_ACTIVE); + bar->pci_resource = bus_alloc_resource_any(ntb->device, + SYS_RES_MEMORY, &bar->pci_resource_id, RF_ACTIVE); if (bar->pci_resource == NULL) return (ENXIO);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309052302.r85N2hrB079158>