Merge tag 'devicetree-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
[sfrench/cifs-2.6.git] / drivers / media / platform / s5p-mfc / s5p_mfc.c
index 0a9f59d8918566ebe175c512b08fbd88a8ec8471..9a53d3908b527b2f4b439d1b48ad3d54ac632987 100644 (file)
@@ -1093,6 +1093,13 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev,
        child->dma_mask = dev->dma_mask;
        child->release = s5p_mfc_memdev_release;
 
+       /*
+        * The memdevs are not proper OF platform devices, so in order for them
+        * to be treated as valid DMA masters we need a bit of a hack to force
+        * them to inherit the MFC node's DMA configuration.
+        */
+       of_dma_configure(child, dev->of_node, true);
+
        if (device_add(child) == 0) {
                ret = of_reserved_mem_device_init_by_idx(child, dev->of_node,
                                                         idx);