mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
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>
This commit is contained in:
parent
6fee48cd33
commit
5f3cd1e0bb
3 changed files with 12 additions and 33 deletions
|
|
@ -6,9 +6,6 @@
|
|||
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
/* note pci_set_dma_mask isn't here, since it's a public function
|
||||
* exported from drivers/pci, use dma_supported instead */
|
||||
|
||||
static inline int
|
||||
pci_dma_supported(struct pci_dev *hwdev, u64 mask)
|
||||
{
|
||||
|
|
@ -104,4 +101,16 @@ pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr)
|
|||
return dma_mapping_error(&pdev->dev, dma_addr);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
|
||||
{
|
||||
return dma_set_mask(&dev->dev, mask);
|
||||
}
|
||||
|
||||
static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
|
||||
{
|
||||
return dma_set_coherent_mask(&dev->dev, mask);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue