From 2baed46e85d33b1f99e6f96033acc85a9a6fbba4 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 13 Mar 2024 15:05:54 -0700 Subject: new-bus: Remove the 'rid' and 'type' arguments from BUS_*ACTIVATE_RESOURCE The public bus_activate/deactivate_resource() API still accepts both forms, but the internal kobj methods no longer pass the arguments. Implementations which need the rid or type now use rman_get_rid() or rman_get_type() to fetch the value from the allocated resource. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44130 --- sys/dev/hyperv/pcib/vmbus_pcib.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'sys/dev/hyperv') diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index 3d3041ee76b3..fd8a7feae984 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -1741,27 +1741,25 @@ vmbus_pcib_release_resource(device_t dev, device_t child, int type, int rid, } static int -vmbus_pcib_activate_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) +vmbus_pcib_activate_resource(device_t dev, device_t child, struct resource *r) { struct vmbus_pcib_softc *sc = device_get_softc(dev); - if (type == PCI_RES_BUS) + if (rman_get_type(r) == PCI_RES_BUS) return (pci_domain_activate_bus(sc->hbus->pci_domain, child, - rid, r)); - return (bus_generic_activate_resource(dev, child, type, rid, r)); + r)); + return (bus_generic_activate_resource(dev, child, r)); } static int -vmbus_pcib_deactivate_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) +vmbus_pcib_deactivate_resource(device_t dev, device_t child, struct resource *r) { struct vmbus_pcib_softc *sc = device_get_softc(dev); - if (type == PCI_RES_BUS) + if (rman_get_type(r) == PCI_RES_BUS) return (pci_domain_deactivate_bus(sc->hbus->pci_domain, child, - rid, r)); - return (bus_generic_deactivate_resource(dev, child, type, rid, r)); + r)); + return (bus_generic_deactivate_resource(dev, child, r)); } static int -- cgit v1.2.3