Simplifying bus alloc resource call since we only need the default values.

Approved by:	jimharris
Sponsored by:	Intel
This commit is contained in:
Carl Delsey 2013-09-05 23:02:43 +00:00
parent e70d7a7c79
commit 93d43573eb

View File

@ -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 *ntb, struct ntb_pci_bar_info *bar)
{
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);