diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2013-12-16 03:34:57 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-12-20 11:45:05 -0500 |
commit | 8ec5db6b20c860ddd1311c794b38c98ce86ac7ae (patch) | |
tree | 1d662f224548eebd7bf4402d67439e679da65fc9 /include/linux/pci.h | |
parent | 2adc7907bac2c72535894732c4b41f9210f9e577 (diff) |
PCI/MSI: Return -ENOSYS for unimplemented interfaces, not -1
Suggested-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 36a5b1828f91..3c95efd12f3c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1156,13 +1156,13 @@ struct msix_entry { | |||
1156 | #ifndef CONFIG_PCI_MSI | 1156 | #ifndef CONFIG_PCI_MSI |
1157 | static inline int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec) | 1157 | static inline int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec) |
1158 | { | 1158 | { |
1159 | return -1; | 1159 | return -ENOSYS; |
1160 | } | 1160 | } |
1161 | 1161 | ||
1162 | static inline int | 1162 | static inline int |
1163 | pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec) | 1163 | pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec) |
1164 | { | 1164 | { |
1165 | return -1; | 1165 | return -ENOSYS; |
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | static inline void pci_msi_shutdown(struct pci_dev *dev) | 1168 | static inline void pci_msi_shutdown(struct pci_dev *dev) |
@@ -1177,7 +1177,7 @@ static inline int pci_msix_table_size(struct pci_dev *dev) | |||
1177 | static inline int pci_enable_msix(struct pci_dev *dev, | 1177 | static inline int pci_enable_msix(struct pci_dev *dev, |
1178 | struct msix_entry *entries, int nvec) | 1178 | struct msix_entry *entries, int nvec) |
1179 | { | 1179 | { |
1180 | return -1; | 1180 | return -ENOSYS; |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | static inline void pci_msix_shutdown(struct pci_dev *dev) | 1183 | static inline void pci_msix_shutdown(struct pci_dev *dev) |