aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-02-06 05:13:53 +0000
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-07-08 18:02:28 +0100
commit3c05e2dd4f596aaa01fd295ca30983999d6517dd (patch)
tree642e29d2f19e10b78cb3422fa2d6e7f7592165b8 /drivers/staging
parentmedia: staging: media: imx: imx7-media-csi: Import notifier helpers (diff)
downloadlinux-dev-3c05e2dd4f596aaa01fd295ca30983999d6517dd.tar.xz
linux-dev-3c05e2dd4f596aaa01fd295ca30983999d6517dd.zip
media: staging: media: imx: imx7-media-csi: Drop duplicate link creation
The imx_media_create_csi2_links() creates a media controller link between the CSI-2 receiver and the next entity in the pipeline, which can be either a video mux (handled by the video-mux driver) or the CSI bridge itself. This isn't needed, as the link is already created either by the video-mux driver or by the imx7-media-csi driver itself (in imx7_csi_notify_bound()). Drop imx_media_create_csi2_links(), which allows dropping the CSI bridge subdev grp_id. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Rui Miguel Silva <rmfrfs@gmail.com> Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/imx/imx7-media-csi.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
index 58c5647dea41..5ab4f996376b 100644
--- a/drivers/staging/media/imx/imx7-media-csi.c
+++ b/drivers/staging/media/imx/imx7-media-csi.c
@@ -727,34 +727,6 @@ static inline struct imx_media_dev *notifier2dev(struct v4l2_async_notifier *n)
}
/*
- * Create the missing media links from the CSI-2 receiver.
- * Called after all async subdevs have bound.
- */
-static void imx_media_create_csi2_links(struct imx_media_dev *imxmd)
-{
- struct v4l2_subdev *sd, *csi2 = NULL;
-
- list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
- if (sd->grp_id == IMX_MEDIA_GRP_ID_CSI2) {
- csi2 = sd;
- break;
- }
- }
- if (!csi2)
- return;
-
- list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
- /* skip if not a CSI or a CSI mux */
- if (!(sd->grp_id & IMX_MEDIA_GRP_ID_IPU_CSI) &&
- !(sd->grp_id & IMX_MEDIA_GRP_ID_CSI) &&
- !(sd->grp_id & IMX_MEDIA_GRP_ID_CSI_MUX))
- continue;
-
- v4l2_create_fwnode_links(csi2, sd);
- }
-}
-
-/*
* adds given video device to given imx-media source pad vdev list.
* Continues upstream from the pad entity's sink pads.
*/
@@ -883,8 +855,6 @@ static int __imx_media_probe_complete(struct v4l2_async_notifier *notifier)
mutex_lock(&imxmd->mutex);
- imx_media_create_csi2_links(imxmd);
-
ret = imx_media_create_pad_vdev_lists(imxmd);
if (ret)
goto unlock;
@@ -1480,7 +1450,6 @@ static int imx7_csi_probe(struct platform_device *pdev)
csi->sd.dev = &pdev->dev;
csi->sd.owner = THIS_MODULE;
csi->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
- csi->sd.grp_id = IMX_MEDIA_GRP_ID_CSI;
snprintf(csi->sd.name, sizeof(csi->sd.name), "csi");
for (i = 0; i < IMX7_CSI_PADS_NUM; i++)