drm: rcar-du: fix common struct sg_table related issues
[platform/kernel/linux-rpi.git] / drivers / media / platform / vsp1 / vsp1_drm.c
index a4a45d6..86d5e3f 100644 (file)
@@ -912,8 +912,8 @@ int vsp1_du_map_sg(struct device *dev, struct sg_table *sgt)
         * skip cache sync. This will need to be revisited when support for
         * non-coherent buffers will be added to the DU driver.
         */
-       return dma_map_sg_attrs(vsp1->bus_master, sgt->sgl, sgt->nents,
-                               DMA_TO_DEVICE, DMA_ATTR_SKIP_CPU_SYNC);
+       return dma_map_sgtable(vsp1->bus_master, sgt, DMA_TO_DEVICE,
+                              DMA_ATTR_SKIP_CPU_SYNC);
 }
 EXPORT_SYMBOL_GPL(vsp1_du_map_sg);
 
@@ -921,8 +921,8 @@ void vsp1_du_unmap_sg(struct device *dev, struct sg_table *sgt)
 {
        struct vsp1_device *vsp1 = dev_get_drvdata(dev);
 
-       dma_unmap_sg_attrs(vsp1->bus_master, sgt->sgl, sgt->nents,
-                          DMA_TO_DEVICE, DMA_ATTR_SKIP_CPU_SYNC);
+       dma_unmap_sgtable(vsp1->bus_master, sgt, DMA_TO_DEVICE,
+                         DMA_ATTR_SKIP_CPU_SYNC);
 }
 EXPORT_SYMBOL_GPL(vsp1_du_unmap_sg);