MLK-16536-2 video: fbdev: dcss: refine 'esize' obtainment
authorFancy Fang <chen.fang@nxp.com>
Tue, 19 Sep 2017 10:56:38 +0000 (18:56 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:38:40 +0000 (15:38 -0500)
The 'esize' is better be got by 'kfifo_esize()'
instead of using 'sizeof' to make the code more
compatible and easier to unserstand.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
drivers/video/fbdev/mxc/imx_dcss.c

index ddba27f..6ed6df8 100644 (file)
@@ -2233,7 +2233,7 @@ static void dcss_ctxld_config(struct work_struct *work)
        chans = &info->chans;
        cfifo = &info->cfifo;
        dsb_len = cc->sb_data_len + cc->db_data_len;
-       esize = sizeof(struct ctxld_unit);
+       esize = kfifo_esize(&cfifo->fifo);
 
        sg_init_table(cfifo->sgl, cfifo->sgl_num);
        nsgl = kfifo_dma_out_prepare(&cfifo->fifo, cfifo->sgl,