mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
pci: eliminate unused driver arg from virPCIDeviceDetach
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.
This commit is contained in:
parent
003118deb4
commit
ee1d1f3b54
@ -10711,7 +10711,7 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev,
|
|||||||
virObjectLock(driver->inactivePciHostdevs);
|
virObjectLock(driver->inactivePciHostdevs);
|
||||||
|
|
||||||
if (virPCIDeviceDetach(pci, driver->activePciHostdevs,
|
if (virPCIDeviceDetach(pci, driver->activePciHostdevs,
|
||||||
driver->inactivePciHostdevs, NULL) < 0) {
|
driver->inactivePciHostdevs) < 0) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -540,7 +540,7 @@ int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
|
|||||||
for (i = 0; i < virPCIDeviceListCount(pcidevs); i++) {
|
for (i = 0; i < virPCIDeviceListCount(pcidevs); i++) {
|
||||||
virPCIDevicePtr dev = virPCIDeviceListGet(pcidevs, i);
|
virPCIDevicePtr dev = virPCIDeviceListGet(pcidevs, i);
|
||||||
if (virPCIDeviceGetManaged(dev) &&
|
if (virPCIDeviceGetManaged(dev) &&
|
||||||
virPCIDeviceDetach(dev, driver->activePciHostdevs, NULL, NULL) < 0)
|
virPCIDeviceDetach(dev, driver->activePciHostdevs, NULL) < 0)
|
||||||
goto reattachdevs;
|
goto reattachdevs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1238,15 +1238,12 @@ cleanup:
|
|||||||
int
|
int
|
||||||
virPCIDeviceDetach(virPCIDevicePtr dev,
|
virPCIDeviceDetach(virPCIDevicePtr dev,
|
||||||
virPCIDeviceList *activeDevs,
|
virPCIDeviceList *activeDevs,
|
||||||
virPCIDeviceList *inactiveDevs,
|
virPCIDeviceList *inactiveDevs)
|
||||||
const char *driver)
|
|
||||||
{
|
{
|
||||||
if (!driver && dev->stubDriver)
|
if (virPCIProbeStubDriver(dev->stubDriver) < 0) {
|
||||||
driver = dev->stubDriver;
|
|
||||||
|
|
||||||
if (virPCIProbeStubDriver(driver) < 0) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1256,7 +1253,7 @@ virPCIDeviceDetach(virPCIDevicePtr dev,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virPCIDeviceBindToStub(dev, driver) < 0)
|
if (virPCIDeviceBindToStub(dev, dev->stubDriver) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Add *a copy of* the dev into list inactiveDevs, if
|
/* Add *a copy of* the dev into list inactiveDevs, if
|
||||||
|
@ -51,8 +51,7 @@ const char *virPCIDeviceGetName(virPCIDevicePtr dev);
|
|||||||
|
|
||||||
int virPCIDeviceDetach(virPCIDevicePtr dev,
|
int virPCIDeviceDetach(virPCIDevicePtr dev,
|
||||||
virPCIDeviceListPtr activeDevs,
|
virPCIDeviceListPtr activeDevs,
|
||||||
virPCIDeviceListPtr inactiveDevs,
|
virPCIDeviceListPtr inactiveDevs);
|
||||||
const char *driver);
|
|
||||||
int virPCIDeviceReattach(virPCIDevicePtr dev,
|
int virPCIDeviceReattach(virPCIDevicePtr dev,
|
||||||
virPCIDeviceListPtr activeDevs,
|
virPCIDeviceListPtr activeDevs,
|
||||||
virPCIDeviceListPtr inactiveDevs);
|
virPCIDeviceListPtr inactiveDevs);
|
||||||
|
@ -2440,7 +2440,7 @@ xenUnifiedNodeDeviceDetachFlags(virNodeDevicePtr dev,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virPCIDeviceDetach(pci, NULL, NULL, NULL) < 0)
|
if (virPCIDeviceDetach(pci, NULL, NULL) < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user