diff options
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 6d34ce91036c..1b4842bb3890 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -758,37 +758,7 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg( | |||
758 | src_sg, src_nents, flags); | 758 | src_sg, src_nents, flags); |
759 | } | 759 | } |
760 | 760 | ||
761 | static inline int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps) | 761 | int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps); |
762 | { | ||
763 | struct dma_device *device; | ||
764 | |||
765 | if (!chan || !caps) | ||
766 | return -EINVAL; | ||
767 | |||
768 | device = chan->device; | ||
769 | |||
770 | /* check if the channel supports slave transactions */ | ||
771 | if (!test_bit(DMA_SLAVE, device->cap_mask.bits)) | ||
772 | return -ENXIO; | ||
773 | |||
774 | /* | ||
775 | * Check whether it reports it uses the generic slave | ||
776 | * capabilities, if not, that means it doesn't support any | ||
777 | * kind of slave capabilities reporting. | ||
778 | */ | ||
779 | if (!device->directions) | ||
780 | return -ENXIO; | ||
781 | |||
782 | caps->src_addr_widths = device->src_addr_widths; | ||
783 | caps->dst_addr_widths = device->dst_addr_widths; | ||
784 | caps->directions = device->directions; | ||
785 | caps->residue_granularity = device->residue_granularity; | ||
786 | |||
787 | caps->cmd_pause = !!device->device_pause; | ||
788 | caps->cmd_terminate = !!device->device_terminate_all; | ||
789 | |||
790 | return 0; | ||
791 | } | ||
792 | 762 | ||
793 | static inline int dmaengine_terminate_all(struct dma_chan *chan) | 763 | static inline int dmaengine_terminate_all(struct dma_chan *chan) |
794 | { | 764 | { |