aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/access.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2012-06-11 01:27:19 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-06-12 11:21:42 -0400
commitc63587d7f5b9db84e71daf5962dc0394eb657da2 (patch)
tree215aace1e4365938c497e2329b5c48614e01188d /drivers/pci/access.c
parentad805758c0eb25bce7b2e3b298d63dc62a1bc71c (diff)
PCI: export pci_user functions for use by other drivers
VFIO PCI support will make use of these for user-initiated PCI config accesses. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/access.c')
-rw-r--r--drivers/pci/access.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 2a581642c237..ba91a7e17519 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -162,7 +162,8 @@ int pci_user_read_config_##size \
162 if (ret > 0) \ 162 if (ret > 0) \
163 ret = -EINVAL; \ 163 ret = -EINVAL; \
164 return ret; \ 164 return ret; \
165} 165} \
166EXPORT_SYMBOL_GPL(pci_user_read_config_##size);
166 167
167/* Returns 0 on success, negative values indicate error. */ 168/* Returns 0 on success, negative values indicate error. */
168#define PCI_USER_WRITE_CONFIG(size,type) \ 169#define PCI_USER_WRITE_CONFIG(size,type) \
@@ -181,7 +182,8 @@ int pci_user_write_config_##size \
181 if (ret > 0) \ 182 if (ret > 0) \
182 ret = -EINVAL; \ 183 ret = -EINVAL; \
183 return ret; \ 184 return ret; \
184} 185} \
186EXPORT_SYMBOL_GPL(pci_user_write_config_##size);
185 187
186PCI_USER_READ_CONFIG(byte, u8) 188PCI_USER_READ_CONFIG(byte, u8)
187PCI_USER_READ_CONFIG(word, u16) 189PCI_USER_READ_CONFIG(word, u16)