The driver arg to virPCIDeviceDetach is no longer used (the name of the stub driver is now set in the virPCIDevice object, and virPCIDeviceDetach retrieves it from there). Remove it.
virObjectLock(driver->inactivePciHostdevs);
if (virPCIDeviceDetach(pci, driver->activePciHostdevs,
- driver->inactivePciHostdevs, NULL) < 0) {
+ driver->inactivePciHostdevs) < 0) {
goto out;
}
for (i = 0; i < virPCIDeviceListCount(pcidevs); i++) {
virPCIDevicePtr dev = virPCIDeviceListGet(pcidevs, i);
if (virPCIDeviceGetManaged(dev) &&
- virPCIDeviceDetach(dev, driver->activePciHostdevs, NULL, NULL) < 0)
+ virPCIDeviceDetach(dev, driver->activePciHostdevs, NULL) < 0)
goto reattachdevs;
}
int
virPCIDeviceDetach(virPCIDevicePtr dev,
virPCIDeviceList *activeDevs,
- virPCIDeviceList *inactiveDevs,
- const char *driver)
+ virPCIDeviceList *inactiveDevs)
{
- if (!driver && dev->stubDriver)
- driver = dev->stubDriver;
-
- if (virPCIProbeStubDriver(driver) < 0) {
+ if (virPCIProbeStubDriver(dev->stubDriver) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to load PCI stub module %s"), driver);
+ _("Failed to load PCI stub module %s"),
+ dev->stubDriver);
return -1;
}
return -1;
}
- if (virPCIDeviceBindToStub(dev, driver) < 0)
+ if (virPCIDeviceBindToStub(dev, dev->stubDriver) < 0)
return -1;
/* Add *a copy of* the dev into list inactiveDevs, if
int virPCIDeviceDetach(virPCIDevicePtr dev,
virPCIDeviceListPtr activeDevs,
- virPCIDeviceListPtr inactiveDevs,
- const char *driver);
+ virPCIDeviceListPtr inactiveDevs);
int virPCIDeviceReattach(virPCIDevicePtr dev,
virPCIDeviceListPtr activeDevs,
virPCIDeviceListPtr inactiveDevs);
goto out;
}
- if (virPCIDeviceDetach(pci, NULL, NULL, NULL) < 0)
+ if (virPCIDeviceDetach(pci, NULL, NULL) < 0)
goto out;
ret = 0;