Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8df00a15 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] media: rename the function that create pad links



With the new API, a link can be either between two PADs or between an interface
and an entity. So, we need to use a better name for the function that create
links between two pads.

So, rename the such function to media_create_pad_link().

No functional changes.

This patch was created via this shell script:
	for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a && mv a $i; done

Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Tested-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 39a956c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ pre-allocated and grows dynamically as needed.

Drivers create links by calling

	media_entity_create_link(struct media_entity *source, u16 source_pad,
	media_create_pad_link(struct media_entity *source, u16 source_pad,
				 struct media_entity *sink,   u16 sink_pad,
				 u32 flags);

+4 −4
Original line number Diff line number Diff line
@@ -412,16 +412,16 @@ void dvb_create_media_graph(struct dvb_adapter *adap)
	}

	if (tuner && fe)
		media_entity_create_link(tuner, 0, fe, 0, 0);
		media_create_pad_link(tuner, 0, fe, 0, 0);

	if (fe && demux)
		media_entity_create_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
		media_create_pad_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);

	if (demux && dvr)
		media_entity_create_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED);
		media_create_pad_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED);

	if (demux && ca)
		media_entity_create_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
		media_create_pad_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
}
EXPORT_SYMBOL_GPL(dvb_create_media_graph);
#endif
+2 −2
Original line number Diff line number Diff line
@@ -1482,11 +1482,11 @@ static int s5c73m3_oif_registered(struct v4l2_subdev *sd)
		return ret;
	}

	ret = media_entity_create_link(&state->sensor_sd.entity,
	ret = media_create_pad_link(&state->sensor_sd.entity,
			S5C73M3_ISP_PAD, &state->oif_sd.entity, OIF_ISP_PAD,
			MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);

	ret = media_entity_create_link(&state->sensor_sd.entity,
	ret = media_create_pad_link(&state->sensor_sd.entity,
			S5C73M3_JPEG_PAD, &state->oif_sd.entity, OIF_JPEG_PAD,
			MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);

+1 −1
Original line number Diff line number Diff line
@@ -1756,7 +1756,7 @@ static int s5k5baf_registered(struct v4l2_subdev *sd)
		v4l2_err(sd, "failed to register subdev %s\n",
			 state->cis_sd.name);
	else
		ret = media_entity_create_link(&state->cis_sd.entity, PAD_CIS,
		ret = media_create_pad_link(&state->cis_sd.entity, PAD_CIS,
					       &state->sd.entity, PAD_CIS,
					       MEDIA_LNK_FL_IMMUTABLE |
					       MEDIA_LNK_FL_ENABLED);
+2 −2
Original line number Diff line number Diff line
@@ -2495,7 +2495,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor)
			return rval;
		}

		rval = media_entity_create_link(&this->sd.entity,
		rval = media_create_pad_link(&this->sd.entity,
						this->source_pad,
						&last->sd.entity,
						last->sink_pad,
@@ -2503,7 +2503,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor)
						MEDIA_LNK_FL_IMMUTABLE);
		if (rval) {
			dev_err(&client->dev,
				"media_entity_create_link failed\n");
				"media_create_pad_link failed\n");
			return rval;
		}

Loading