summaryrefslogtreecommitdiffstats
path: root/drivers/staging/imx-drm/imx-drm-core.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-06-10 16:56:16 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-10-31 14:49:06 +0000
commit4cdbb4ff7fe456c43e9d6c6397e37380ff292520 (patch)
tree6d27e0e1ee944715fbc38d90c45a43c65799c8e5 /drivers/staging/imx-drm/imx-drm-core.c
parente1fd7341837238c6c5380c5073887d238f706cf0 (diff)
downloadop-kernel-dev-4cdbb4ff7fe456c43e9d6c6397e37380ff292520.zip
op-kernel-dev-4cdbb4ff7fe456c43e9d6c6397e37380ff292520.tar.gz
DMA-API: staging: use dma_set_coherent_mask()
The correct way for a driver to specify the coherent DMA mask is not to directly access the field in the struct device, but to use dma_set_coherent_mask(). Only arch and bus code should access this member directly. Convert all direct write accesses to using the correct API. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/staging/imx-drm/imx-drm-core.c')
-rw-r--r--drivers/staging/imx-drm/imx-drm-core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
index 47c58884..847f430 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -805,6 +805,12 @@ static struct drm_driver imx_drm_driver = {
static int imx_drm_platform_probe(struct platform_device *pdev)
{
+ int ret;
+
+ ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ if (ret)
+ return ret;
+
imx_drm_device->dev = &pdev->dev;
return drm_platform_init(&imx_drm_driver, pdev);
@@ -847,8 +853,6 @@ static int __init imx_drm_init(void)
goto err_pdev;
}
- imx_drm_pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32),
-
ret = platform_driver_register(&imx_drm_pdrv);
if (ret)
goto err_pdrv;
OpenPOWER on IntegriCloud