diff options
author | John Baldwin <jhb@FreeBSD.org> | 2024-03-13 22:05:54 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2024-03-13 22:05:54 +0000 |
commit | 2baed46e85d33b1f99e6f96033acc85a9a6fbba4 (patch) | |
tree | b84c8a85556cbeba400cbccebda501f7787a7a41 /sys/dev/hyperv | |
parent | d77f2092ceebaba115e6be53410428f6f5f6ae83 (diff) |
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
Diffstat (limited to 'sys/dev/hyperv')
-rw-r--r-- | sys/dev/hyperv/pcib/vmbus_pcib.c | 18 |
1 files changed, 8 insertions, 10 deletions
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 |