svn commit: r200522 - head/sys/dev/vge
Pyun YongHyeon
yongari at FreeBSD.org
Mon Dec 14 10:27:35 PST 2009
Author: yongari
Date: Mon Dec 14 18:27:34 2009
New Revision: 200522
URL: http://svn.freebsd.org/changeset/base/200522
Log:
Prefer bus_alloc_resource_any(9) to bus_alloc_resource(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 18:19:56 2009 (r200521)
+++ head/sys/dev/vge/if_vge.c Mon Dec 14 18:27:34 2009 (r200522)
@@ -933,8 +933,8 @@ vge_attach(dev)
pci_enable_busmaster(dev);
rid = VGE_PCI_LOMEM;
- sc->vge_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
- 0, ~0, 1, RF_ACTIVE);
+ sc->vge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+ RF_ACTIVE);
if (sc->vge_res == NULL) {
device_printf(dev, "couldn't map ports/memory\n");
@@ -944,8 +944,8 @@ vge_attach(dev)
/* Allocate interrupt */
rid = 0;
- sc->vge_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
- 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
+ sc->vge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
+ RF_SHAREABLE | RF_ACTIVE);
if (sc->vge_irq == NULL) {
device_printf(dev, "couldn't map interrupt\n");
More information about the svn-src-all
mailing list