projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
057a288
)
Add compatibility function pci_name(pci_dev) for kernel < 2.4.22. It
author
Ian Abbott
<abbotti@mev.co.uk>
Mon, 7 Aug 2006 18:01:40 +0000
(18:01 +0000)
committer
Ian Abbott
<abbotti@mev.co.uk>
Mon, 7 Aug 2006 18:01:40 +0000
(18:01 +0000)
returns the pci device name as a char * (e.g. "00:09.0" for bus 0, slot 9,
func 0, or "0000:00:09.0" for recent kernels that include the PCI domain
in the string).
include/linux/pci.h
patch
|
blob
|
history
diff --git
a/include/linux/pci.h
b/include/linux/pci.h
index 19e71e42456aa733a27c49c5bdee0864cc1341ee..39f1639b3778e8e70d6613a96c260a3d389cf4cc 100644
(file)
--- a/
include/linux/pci.h
+++ b/
include/linux/pci.h
@@
-16,6
+16,13
@@
#define pci_dev_put(x)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
+static inline char *pci_name(struct pci_dev *pdev)
+{
+ return pdev->slot_name;
+}
+#endif
+
#endif /* _COMPAT_PCI_H */