Skip to content

Commit 3a720d7

Browse files
Brice GoglinJeff Garzik
authored andcommitted
[PATCH] Revive pci_find_ext_capability
This patch revives pci_find_ext_capability (has been disabled a couple month ago since it was not used anywhere. See http://lkml.org/lkml/2006/1/20/247). It will now be used by the myri10ge driver. Signed-off-by: Brice Goglin <[email protected]> Signed-off-by: Andrew J. Gallatin <[email protected]> drivers/pci/pci.c | 3 +-- include/linux/pci.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) Signed-off-by: Jeff Garzik <[email protected]>
1 parent d99ef36 commit 3a720d7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/pci/pci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap)
164164
return __pci_bus_find_cap(bus, devfn, hdr_type & 0x7f, cap);
165165
}
166166

167-
#if 0
168167
/**
169168
* pci_find_ext_capability - Find an extended capability
170169
* @dev: PCI device to query
@@ -212,7 +211,7 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap)
212211

213212
return 0;
214213
}
215-
#endif /* 0 */
214+
EXPORT_SYMBOL_GPL(pci_find_ext_capability);
216215

217216
/**
218217
* pci_find_parent_resource - return resource region of parent bus of given region

include/linux/pci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int devic
442442
struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
443443
int pci_find_capability (struct pci_dev *dev, int cap);
444444
int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
445+
int pci_find_ext_capability (struct pci_dev *dev, int cap);
445446
struct pci_bus * pci_find_next_bus(const struct pci_bus *from);
446447

447448
struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from);
@@ -662,6 +663,7 @@ static inline int pci_register_driver(struct pci_driver *drv) { return 0;}
662663
static inline void pci_unregister_driver(struct pci_driver *drv) { }
663664
static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; }
664665
static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; }
666+
static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; }
665667
static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; }
666668

667669
/* Power management related routines */

0 commit comments

Comments
 (0)