s390/pci: only add specific device in zpci_bus_scan_device()

As the name suggests zpci_bus_scan_device() is used to scan a specific
device and thus pci_bus_add_device() for that device is sufficient.
Furthermore move this call inside the rescan/remove locking.

Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20230306151014.60913-3-schnelle@linux.ibm.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
pull/795/merge
Niklas Schnelle 2023-03-06 16:10:12 +01:00 committed by Vasily Gorbik
parent 029a4f4b95
commit ae83707f39
1 changed files with 1 additions and 2 deletions

View File

@ -87,9 +87,8 @@ int zpci_bus_scan_device(struct zpci_dev *zdev)
if (!pdev)
return -ENODEV;
pci_bus_add_device(pdev);
pci_lock_rescan_remove();
pci_bus_add_devices(zdev->zbus->bus);
pci_bus_add_device(pdev);
pci_unlock_rescan_remove();
return 0;