OSDN Git Service

media: imx: imx7-mipi-csis: Remove link setup on source pad
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 12 Mar 2020 23:47:19 +0000 (00:47 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 10:44:35 +0000 (12:44 +0200)
The driver rejects enablement of multiple links on its source pad. This
isn't needed, as the CSIS doesn't care. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx7-mipi-csis.c

index 32fd846..377a3f0 100644 (file)
@@ -254,7 +254,6 @@ struct csi_state {
 
        struct csis_hw_reset hw_reset;
        struct regulator *mipi_phy_regulator;
-       bool sink_linked;
 };
 
 struct csis_pix_format {
@@ -675,17 +674,7 @@ static int mipi_csis_link_setup(struct media_entity *entity,
 
        mutex_lock(&state->lock);
 
-       if (local_pad->flags & MEDIA_PAD_FL_SOURCE) {
-               if (flags & MEDIA_LNK_FL_ENABLED) {
-                       if (state->sink_linked) {
-                               ret = -EBUSY;
-                               goto out;
-                       }
-                       state->sink_linked = true;
-               } else {
-                       state->sink_linked = false;
-               }
-       } else {
+       if (local_pad->flags & MEDIA_PAD_FL_SINK) {
                if (flags & MEDIA_LNK_FL_ENABLED) {
                        if (state->src_sd) {
                                ret = -EBUSY;