media: nxp: imx8-isi: Replace udelay() with fsleep()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 7 Apr 2023 04:25:28 +0000 (05:25 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 16 Apr 2023 06:37:44 +0000 (07:37 +0100)
The ISI driver uses udelay() to wait for 300µs in a context where it can
sleep. Use fsleep() instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c

index eddc7fc..be12d0d 100644 (file)
@@ -86,7 +86,8 @@ void mxc_isi_channel_m2m_start(struct mxc_isi_pipe *pipe)
        val = mxc_isi_read(pipe, CHNL_MEM_RD_CTRL);
        val &= ~CHNL_MEM_RD_CTRL_READ_MEM;
        mxc_isi_write(pipe, CHNL_MEM_RD_CTRL, val);
-       udelay(300);
+
+       fsleep(300);
 
        val |= CHNL_MEM_RD_CTRL_READ_MEM;
        mxc_isi_write(pipe, CHNL_MEM_RD_CTRL, val);