media: ti-vpe: cal: Store buffer DMA address in dma_addr_t
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 6 Dec 2020 23:53:51 +0000 (00:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 4 Jan 2021 11:16:36 +0000 (12:16 +0100)
dma_addr_t is the correct type to store DMA addresses. Replace incorrect
usage of unsigned long and unsigned int.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal-video.c
drivers/media/platform/ti-vpe/cal.c
drivers/media/platform/ti-vpe/cal.h

index 438447728b46a92b11e0edd842327b3bf84397d2..511767dd69bdf1a95620361ac4c56dbcc653cd07 100644 (file)
@@ -508,7 +508,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
 {
        struct cal_ctx *ctx = vb2_get_drv_priv(vq);
        struct cal_buffer *buf;
-       unsigned long addr;
+       dma_addr_t addr;
        int ret;
 
        spin_lock_irq(&ctx->dma.lock);
index 547dffcfe68fa5e71592877419c0966b2e25f856..3cf625262d3219d0de7924e26c4c73fd77fb4391 100644 (file)
@@ -406,9 +406,9 @@ void cal_ctx_wr_dma_config(struct cal_ctx *ctx)
        ctx_dbg(3, ctx, "CAL_CTRL = 0x%08x\n", cal_read(ctx->cal, CAL_CTRL));
 }
 
-void cal_ctx_wr_dma_addr(struct cal_ctx *ctx, unsigned int dmaaddr)
+void cal_ctx_wr_dma_addr(struct cal_ctx *ctx, dma_addr_t addr)
 {
-       cal_write(ctx->cal, CAL_WR_DMA_ADDR(ctx->index), dmaaddr);
+       cal_write(ctx->cal, CAL_WR_DMA_ADDR(ctx->index), addr);
 }
 
 void cal_ctx_wr_dma_disable(struct cal_ctx *ctx)
@@ -491,7 +491,7 @@ static inline void cal_irq_wdma_start(struct cal_ctx *ctx)
                 * hardware.
                 */
                struct cal_buffer *buf;
-               unsigned long addr;
+               dma_addr_t addr;
 
                buf = list_first_entry(&ctx->dma.queue, struct cal_buffer,
                                       list);
index 9d3cbc13f915572c89fe824e669654dfd82f3573..26916f72fd60ae2b1c605562f2ec6792a8ffd600 100644 (file)
@@ -299,7 +299,7 @@ void cal_camerarx_destroy(struct cal_camerarx *phy);
 void cal_ctx_csi2_config(struct cal_ctx *ctx);
 void cal_ctx_pix_proc_config(struct cal_ctx *ctx);
 void cal_ctx_wr_dma_config(struct cal_ctx *ctx);
-void cal_ctx_wr_dma_addr(struct cal_ctx *ctx, unsigned int dmaaddr);
+void cal_ctx_wr_dma_addr(struct cal_ctx *ctx, dma_addr_t addr);
 void cal_ctx_wr_dma_disable(struct cal_ctx *ctx);
 int cal_ctx_wr_dma_stop(struct cal_ctx *ctx);
 void cal_ctx_enable_irqs(struct cal_ctx *ctx);