Skip to content

Commit 3b073ed

Browse files
Alex Chiangjbarnes993
authored andcommitted
PCI: remove deprecated pci_find_slot() interface
The last in-tree caller of pci_find_slot has been converted, so let's get rid of this deprecated interface. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent 12a9da0 commit 3b073ed

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

drivers/pci/search.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -114,36 +114,6 @@ pci_find_next_bus(const struct pci_bus *from)
114114
}
115115

116116
#ifdef CONFIG_PCI_LEGACY
117-
/**
118-
* pci_find_slot - locate PCI device from a given PCI slot
119-
* @bus: number of PCI bus on which desired PCI device resides
120-
* @devfn: encodes number of PCI slot in which the desired PCI
121-
* device resides and the logical device number within that slot
122-
* in case of multi-function devices.
123-
*
124-
* Given a PCI bus and slot/function number, the desired PCI device
125-
* is located in system global list of PCI devices. If the device
126-
* is found, a pointer to its data structure is returned. If no
127-
* device is found, %NULL is returned.
128-
*
129-
* NOTE: Do not use this function any more; use pci_get_slot() instead, as
130-
* the PCI device returned by this function can disappear at any moment in
131-
* time.
132-
*/
133-
struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn)
134-
{
135-
struct pci_dev *dev = NULL;
136-
137-
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
138-
if (dev->bus->number == bus && dev->devfn == devfn) {
139-
pci_dev_put(dev);
140-
return dev;
141-
}
142-
}
143-
return NULL;
144-
}
145-
EXPORT_SYMBOL(pci_find_slot);
146-
147117
/**
148118
* pci_find_device - begin or continue searching for a PCI device by vendor/device id
149119
* @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids

include/linux/pci.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,6 @@ extern void pci_sort_breadthfirst(void);
599599
struct pci_dev __deprecated *pci_find_device(unsigned int vendor,
600600
unsigned int device,
601601
struct pci_dev *from);
602-
struct pci_dev __deprecated *pci_find_slot(unsigned int bus,
603-
unsigned int devfn);
604602
#endif /* CONFIG_PCI_LEGACY */
605603

606604
enum pci_lost_interrupt_reason {
@@ -936,12 +934,6 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor,
936934
return NULL;
937935
}
938936

939-
static inline struct pci_dev *pci_find_slot(unsigned int bus,
940-
unsigned int devfn)
941-
{
942-
return NULL;
943-
}
944-
945937
static inline struct pci_dev *pci_get_device(unsigned int vendor,
946938
unsigned int device,
947939
struct pci_dev *from)

0 commit comments

Comments
 (0)