]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
PCI: Remove no_pci_devices()
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 2 Apr 2026 22:18:15 +0000 (00:18 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 7 Apr 2026 19:46:04 +0000 (14:46 -0500)
After having removed the last usage of no_pci_devices(), this function
can be removed.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/b0ce592d-c34c-4e0b-b389-4e346b3a0c44@gmail.com
drivers/pci/probe.c
include/linux/pci.h

index bccc7a4bdd794384b7877d453c7989941471c999..19d73f6132fb4bc7fa73db41429ab6163da2b3cd 100644 (file)
@@ -67,23 +67,6 @@ static struct resource *get_pci_domain_busn_res(int domain_nr)
        return &r->res;
 }
 
-/*
- * Some device drivers need know if PCI is initiated.
- * Basically, we think PCI is not initiated when there
- * is no device to be found on the pci_bus_type.
- */
-int no_pci_devices(void)
-{
-       struct device *dev;
-       int no_devices;
-
-       dev = bus_find_next_device(&pci_bus_type, NULL);
-       no_devices = (dev == NULL);
-       put_device(dev);
-       return no_devices;
-}
-EXPORT_SYMBOL(no_pci_devices);
-
 /*
  * PCI Bus Class
  */
index 1c270f1d512301de4d462fe7e5097c32af5c6f8d..482dd8460dd95d1fbcff1b2cbd056ae4562a0767 100644 (file)
@@ -1193,8 +1193,6 @@ extern const struct bus_type pci_bus_type;
 /* Do NOT directly access these two variables, unless you are arch-specific PCI
  * code, or PCI core code. */
 extern struct list_head pci_root_buses;        /* List of all known PCI buses */
-/* Some device drivers need know if PCI is initiated */
-int no_pci_devices(void);
 
 void pcibios_resource_survey_bus(struct pci_bus *bus);
 void pcibios_bus_add_device(struct pci_dev *pdev);
@@ -2132,7 +2130,6 @@ static inline struct pci_dev *pci_get_base_class(unsigned int class,
 static inline int pci_dev_present(const struct pci_device_id *ids)
 { return 0; }
 
-#define no_pci_devices()       (1)
 #define pci_dev_put(dev)       do { } while (0)
 
 static inline void pci_set_master(struct pci_dev *dev) { }