diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 0e9844929fe3..cfa1455848f4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1020,6 +1020,20 @@ static inline char *pci_name(struct pci_dev *pdev) | |||
1020 | #define pci_pretty_name(dev) "" | 1020 | #define pci_pretty_name(dev) "" |
1021 | #endif | 1021 | #endif |
1022 | 1022 | ||
1023 | |||
1024 | /* Some archs don't want to expose struct resource to userland as-is | ||
1025 | * in sysfs and /proc | ||
1026 | */ | ||
1027 | #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER | ||
1028 | static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, | ||
1029 | const struct resource *rsrc, u64 *start, u64 *end) | ||
1030 | { | ||
1031 | *start = rsrc->start; | ||
1032 | *end = rsrc->end; | ||
1033 | } | ||
1034 | #endif /* HAVE_ARCH_PCI_RESOURCE_TO_USER */ | ||
1035 | |||
1036 | |||
1023 | /* | 1037 | /* |
1024 | * The world is not perfect and supplies us with broken PCI devices. | 1038 | * The world is not perfect and supplies us with broken PCI devices. |
1025 | * For at least a part of these bugs we need a work-around, so both | 1039 | * For at least a part of these bugs we need a work-around, so both |