summaryrefslogtreecommitdiff
path: root/arch/s390/pci
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2023-03-06 18:10:12 +0300
committerVasily Gorbik <gor@linux.ibm.com>2023-03-13 11:16:43 +0300
commitae83707f39e1b8f2a15af3868bba25ce4fa93364 (patch)
treebf500dcddba843f48889c418081ffa73167662aa /arch/s390/pci
parent029a4f4b9555ddb47f38f9589fd6d43277efb9c6 (diff)
downloadlinux-ae83707f39e1b8f2a15af3868bba25ce4fa93364.tar.xz
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>
Diffstat (limited to 'arch/s390/pci')
-rw-r--r--arch/s390/pci/pci_bus.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/pci/pci_bus.c b/arch/s390/pci/pci_bus.c
index 6a8da1b742ae..465399dc4a53 100644
--- a/arch/s390/pci/pci_bus.c
+++ b/arch/s390/pci/pci_bus.c
@@ -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;