* are locked
*/
static void
-virHostdevReattachPCIDevice(virPCIDevicePtr dev, virHostdevManagerPtr mgr)
+virHostdevReattachPCIDevice(virHostdevManagerPtr mgr,
+ virPCIDevicePtr dev)
{
/* If the device is not managed and was attached to guest
* successfully, it must have been inactive.
*/
while (virPCIDeviceListCount(pcidevs) > 0) {
virPCIDevicePtr dev = virPCIDeviceListStealIndex(pcidevs, 0);
- virHostdevReattachPCIDevice(dev, hostdev_mgr);
+ virHostdevReattachPCIDevice(hostdev_mgr, dev);
}
virObjectUnref(pcidevs);