]> Pileus Git - ~andy/linux/commit
DMA-API: provide a helper to setup DMA masks
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 27 Jun 2013 11:21:45 +0000 (12:21 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 31 Oct 2013 14:48:46 +0000 (14:48 +0000)
commitfa6a8d6d65b19ab44e5244ea499bcd553cc72343
tree789f1db34489c2eed65718df5c4bbcb102c09b48
parent4ffb4318b044d175709567402a65f8ebb19f5d3b
DMA-API: provide a helper to setup DMA masks

Many drivers contain code such as:

dev->dma_mask = &dev->coherent_dma_mask;
dev->coherent_dma_mask = MASK;

Let's move this pattern out of drivers and have the DMA API provide a
helper for it.  This helper uses dma_set_mask_and_coherent() to allow
platform issues to be properly dealt with via dma_set_mask()/
dma_is_supported().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/linux/dma-mapping.h