staging: comedi: addi_apci_3120: use dma_alloc_coherent()
authorIan Abbott <abbotti@mev.co.uk>
Fri, 12 Sep 2014 11:19:56 +0000 (12:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2014 22:39:39 +0000 (15:39 -0700)
commitfbfd9c8a1782f33d7b67294b2a42587063e61c0c
tree20239e15b6d436ae26e0f579072995e41c432acf
parent9c97e588d82e90ca74488cd16e8f804cbec75978
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: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/Kconfig
drivers/staging/comedi/drivers/addi-data/addi_common.h
drivers/staging/comedi/drivers/addi_apci_3120.c