]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/host/ohci-pxa27x.c
DMA-API: usb: use dma_set_coherent_mask()
[karo-tx-linux.git] / drivers / usb / host / ohci-pxa27x.c
index 93371a235e821fac080068f7522bc5a80576119c..74696ae29aa6981d26aaa79020765471b6bf8ee4 100644 (file)
@@ -287,6 +287,7 @@ static int ohci_pxa_of_init(struct platform_device *pdev)
        struct device_node *np = pdev->dev.of_node;
        struct pxaohci_platform_data *pdata;
        u32 tmp;
+       int ret;
 
        if (!np)
                return 0;
@@ -297,8 +298,9 @@ static int ohci_pxa_of_init(struct platform_device *pdev)
         */
        if (!pdev->dev.dma_mask)
                pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
-       if (!pdev->dev.coherent_dma_mask)
-               pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+       ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+       if (ret)
+               return ret;
 
        pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
        if (!pdata)