]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
DMA-API: dcdbas: update DMA mask handing
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 27 Jun 2013 13:14:43 +0000 (14:14 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 13 Oct 2013 17:49:37 +0000 (18:49 +0100)
commitf0a3e525b1a6d628dd8c549f5c5ea63df0c40366
tree616496621b3f1d008531e671d120b48693e8926f
parentf11e4a037d3076214d80464ead490a99265a7c4a
DMA-API: dcdbas: update DMA mask handing

dcdbas was explicitly initializing DMA masks thusly:
dcdbas_pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
dcdbas_pdev->dev.dma_mask = &dcdbas_pdev->dev.coherent_dma_mask;
which bypasses the architecture check.  Moreover, it is creating the
dcdbas_pdev device itself, and using the platform_device_register_full()
avoids some of this explicit initialization.

Convert the driver to use platform_device_register_full(), and as it
makes use of coherent DMA, also call dma_set_coherent_mask() to ensure
that the architecture gets to check the mask.

Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/firmware/dcdbas.c