Staging: comedi: remove usb wrappers
[pandora-kernel.git] / drivers / staging / comedi / pci.h
1 /*
2  * linux/pci.h compatibility header
3  */
4
5 #ifndef _COMPAT_PCI_H
6 #define _COMPAT_PCI_H
7
8 #include <linux/version.h>
9
10 #include <linux/pci.h>
11
12 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
13 #define pci_get_device pci_find_device
14 #define pci_get_subsys pci_find_subsys
15 #define pci_dev_get(x)  (x)
16 #define pci_dev_put(x)
17 #endif
18
19 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
20 static inline char *pci_name(struct pci_dev *pdev)
21 {
22         return pdev->slot_name;
23 }
24 #endif
25
26 #ifndef DEFINE_PCI_DEVICE_TABLE
27 #define DEFINE_PCI_DEVICE_TABLE(_table) \
28         struct pci_device_id _table[]
29 #endif
30
31 #endif /* _COMPAT_PCI_H */