Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linuxkpi/common/include/linux/pci.h
Show First 20 Lines • Show All 1,044 Lines • ▼ Show 20 Lines | |||||
* allowed to be NULL. Other pointers must be all valid. | * allowed to be NULL. Other pointers must be all valid. | ||||
* The pci_dev structure should be zero-initialized before passed | * The pci_dev structure should be zero-initialized before passed | ||||
* to the linux_pci_attach_device function. | * to the linux_pci_attach_device function. | ||||
*/ | */ | ||||
extern int linux_pci_attach_device(device_t, struct pci_driver *, | extern int linux_pci_attach_device(device_t, struct pci_driver *, | ||||
const struct pci_device_id *, struct pci_dev *); | const struct pci_device_id *, struct pci_dev *); | ||||
extern int linux_pci_detach_device(struct pci_dev *); | extern int linux_pci_detach_device(struct pci_dev *); | ||||
static inline int | |||||
pci_dev_present(const struct pci_device_id *cur) | |||||
{ | |||||
while (cur != NULL && (cur->vendor || cur->device)) { | |||||
if (pci_find_device(cur->vendor, cur->device) != NULL) { | |||||
return (1); | |||||
} | |||||
cur++; | |||||
} | |||||
return (0); | |||||
} | |||||
#endif /* _LINUX_PCI_H_ */ | #endif /* _LINUX_PCI_H_ */ |