]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
DMA-API: video: clcd: add dma_set_mask_and_coherent() call
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 27 Jun 2013 09:29:32 +0000 (10:29 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 31 Oct 2013 14:48:42 +0000 (14:48 +0000)
The DMA API requires drivers to call the appropriate dma_set_mask()
functions before doing any DMA mapping.  Add this required call to
the AMBA PL08x driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/video/amba-clcd.c

index 0a2cce7285be99dd8aaa7983a43bbeae7e6b2550..afe4702a5528a0ea9675cdabfce8ee4243e3799a 100644 (file)
@@ -10,6 +10,7 @@
  *
  *  ARM PrimeCell PL110 Color LCD Controller
  */
+#include <linux/dma-mapping.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -551,6 +552,10 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id)
        if (!board)
                return -EINVAL;
 
+       ret = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
+       if (ret)
+               goto out;
+
        ret = amba_request_regions(dev, NULL);
        if (ret) {
                printk(KERN_ERR "CLCD: unable to reserve regs region\n");