From: Frank Mori Hess Date: Fri, 3 May 2002 03:11:28 +0000 (+0000) Subject: fixed pci_resource_len for pre 2.2.18 kernels, I didn't realize it was X-Git-Tag: r0_7_65~64 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9a93a56ff8fbd1d6cf3e79e17a5acc85d514261d;p=comedi.git fixed pci_resource_len for pre 2.2.18 kernels, I didn't realize it was just a dummy function even for later 2.2 kernels. Make pci_request_regions compatibility stuff pretty useless. --- diff --git a/include/linux/pci.h b/include/linux/pci.h index 7ce4e2cc..ac0bcf72 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -77,7 +77,7 @@ extern inline unsigned long pci_resource_start(struct pci_dev *dev, unsigned int extern inline unsigned long pci_resource_end(struct pci_dev *dev, unsigned int bar) { - return pci_resource_start(dev, bar) + pci_resource_len(dev, bar) - 1; + return pci_resource_start(dev, bar); } extern inline int pci_request_regions(struct pci_dev *dev, char *name) @@ -136,6 +136,11 @@ extern inline void pci_set_master(struct pci_dev *dev) { return; } #endif // 2.2.14 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18) +extern inline unsigned long pci_resource_len (struct pci_dev *dev, int n_base) +{ return 0; } +#endif // 2.2.18 + #endif #endif /* _COMPAT_PCI_H */