Commit f2635a9a authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: imx: imx7-media-csi: Merge streaming_start() with csi_enable()

The imx7_csi_streaming_start() function just wraps imx7_csi_enable().
Call the latter directly.

Similarly, merge imx7_csi_streaming_stop() and imx7_csi_disable() as
they're both called from a single location only.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent ff43ca91
...@@ -611,6 +611,8 @@ static void imx7_csi_enable(struct imx7_csi *csi) ...@@ -611,6 +611,8 @@ static void imx7_csi_enable(struct imx7_csi *csi)
static void imx7_csi_disable(struct imx7_csi *csi) static void imx7_csi_disable(struct imx7_csi *csi)
{ {
imx7_csi_dma_stop(csi);
imx7_csi_dmareq_rff_disable(csi); imx7_csi_dmareq_rff_disable(csi);
imx7_csi_hw_disable_irq(csi); imx7_csi_hw_disable_irq(csi);
...@@ -620,20 +622,6 @@ static void imx7_csi_disable(struct imx7_csi *csi) ...@@ -620,20 +622,6 @@ static void imx7_csi_disable(struct imx7_csi *csi)
imx7_csi_hw_disable(csi); imx7_csi_hw_disable(csi);
} }
static void imx7_csi_streaming_start(struct imx7_csi *csi)
{
imx7_csi_enable(csi);
}
static int imx7_csi_streaming_stop(struct imx7_csi *csi)
{
imx7_csi_dma_stop(csi);
imx7_csi_disable(csi);
return 0;
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Interrupt Handling * Interrupt Handling
*/ */
...@@ -767,9 +755,9 @@ static int imx7_csi_s_stream(struct v4l2_subdev *sd, int enable) ...@@ -767,9 +755,9 @@ static int imx7_csi_s_stream(struct v4l2_subdev *sd, int enable)
goto out_unlock; goto out_unlock;
} }
imx7_csi_streaming_start(csi); imx7_csi_enable(csi);
} else { } else {
imx7_csi_streaming_stop(csi); imx7_csi_disable(csi);
v4l2_subdev_call(csi->src_sd, video, s_stream, 0); v4l2_subdev_call(csi->src_sd, video, s_stream, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment