Skip to content
Commit fbfd9c8a authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: addi_apci_3120: use dma_alloc_coherent()



Use `dma_alloc_coherent()` to allocate the DMA buffers instead of
using `__get_free_pages()` to allocate and `virt_to_bus()` to get the
hardware address.  The coherent buffers are fairly small - at most 4
pages (although there are two of them).  Use of `virt_to_bus()` is
discouraged.

Note: `struct addi_private` is used by some other ADDI-DATA drivers as
well, but this is the only one using the affected members.

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9c97e588
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment