diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-03-10 18:23:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:42 -0500 |
commit | 5f3cd1e0bb452c31a306a3e764514ea2eaf7d2e0 (patch) | |
tree | 2fe245e004491e195127fe2327d48775b45ed4e1 /include | |
parent | 6fee48cd330c68332f9712bc968d934a1a84a32a (diff) |
dma-mapping: pci: move pci_set_dma_mask and pci_set_consistent_dma_mask to pci-dma-compat.h
We can use pci-dma-compat.h to implement pci_set_dma_mask and
pci_set_consistent_dma_mask as we do with the other PCI DMA API.
We can remove HAVE_ARCH_PCI_SET_DMA_MASK too.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/pci-dma-compat.h | 15 | ||||
-rw-r--r-- | include/linux/pci.h | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/include/asm-generic/pci-dma-compat.h b/include/asm-generic/pci-dma-compat.h index 37b3706226e7..1437b7da09b2 100644 --- a/include/asm-generic/pci-dma-compat.h +++ b/include/asm-generic/pci-dma-compat.h | |||
@@ -6,9 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
8 | 8 | ||
9 | /* note pci_set_dma_mask isn't here, since it's a public function | ||
10 | * exported from drivers/pci, use dma_supported instead */ | ||
11 | |||
12 | static inline int | 9 | static inline int |
13 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) | 10 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) |
14 | { | 11 | { |
@@ -104,4 +101,16 @@ pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr) | |||
104 | return dma_mapping_error(&pdev->dev, dma_addr); | 101 | return dma_mapping_error(&pdev->dev, dma_addr); |
105 | } | 102 | } |
106 | 103 | ||
104 | #ifdef CONFIG_PCI | ||
105 | static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
106 | { | ||
107 | return dma_set_mask(&dev->dev, mask); | ||
108 | } | ||
109 | |||
110 | static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
111 | { | ||
112 | return dma_set_coherent_mask(&dev->dev, mask); | ||
113 | } | ||
114 | #endif | ||
115 | |||
107 | #endif | 116 | #endif |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7fd5c574efae..a788fa12ff31 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -769,8 +769,6 @@ int pci_try_set_mwi(struct pci_dev *dev); | |||
769 | void pci_clear_mwi(struct pci_dev *dev); | 769 | void pci_clear_mwi(struct pci_dev *dev); |
770 | void pci_intx(struct pci_dev *dev, int enable); | 770 | void pci_intx(struct pci_dev *dev, int enable); |
771 | void pci_msi_off(struct pci_dev *dev); | 771 | void pci_msi_off(struct pci_dev *dev); |
772 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | ||
773 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | ||
774 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); | 772 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); |
775 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); | 773 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); |
776 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 774 | int pcix_get_max_mmrbc(struct pci_dev *dev); |