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

Commit c387be3e authored by Shiju Mathew's avatar Shiju Mathew
Browse files

msm: ba: Update video input device enumeration



Remove signal status check during enumeration to avoid
any unnecessary polling of device status during bootup.
The single status check is done when device is open for
streaming.

CRs-Fixed: 1092315
Change-Id: I2027fe0fab0fb865071001e7400ba7672433d8f5
Signed-off-by: default avatarShiju Mathew <shijum@codeaurora.org>
parent 3c3215e3
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -132,7 +132,6 @@ int msm_ba_enum_input(void *instance, struct v4l2_input *input)
{
	struct msm_ba_input *ba_input = NULL;
	struct msm_ba_inst *inst = instance;
	int status = 0;
	int rc = 0;

	if (!inst || !input)
@@ -152,16 +151,6 @@ int msm_ba_enum_input(void *instance, struct v4l2_input *input)
		else
			input->capabilities = V4L2_IN_CAP_STD;
		dprintk(BA_DBG, "msm_ba_find_input: name %s", input->name);
		/* get current signal status */
		rc = v4l2_subdev_call(
			ba_input->sd, video, g_input_status, &status);
		if (rc) {
			dprintk(BA_ERR, "g_input_status failed (%d) for sd: %s",
				rc, ba_input->sd->name);
		} else {
			input->status = status;
			ba_input->signal_status = status;
		}
	}
	return rc;
}
+0 −9
Original line number Diff line number Diff line
@@ -189,7 +189,6 @@ void msm_ba_add_inputs(struct v4l2_subdev *sd)
	int start_index = 0;
	int end_index = 0;
	int dev_id = 0;
	int status = 0;

	dev_ctxt = get_ba_dev();
	if (!list_empty(&dev_ctxt->inputs))
@@ -219,14 +218,6 @@ void msm_ba_add_inputs(struct v4l2_subdev *sd)
			input->input_user_type =
				msm_ba_inp_cfg[i].input_user_type;
			input->sd = sd;
			rc = v4l2_subdev_call(
				sd, video, g_input_status, &status);
			if (rc)
				dprintk(BA_ERR,
					"g_input_status failed for sd: %s",
					sd->name);
			else
				input->signal_status = status;
			list_add_tail(&input->list, &dev_ctxt->inputs);
			dev_ctxt->num_inputs++;
			dprintk(BA_DBG, "Add input: name %s on %d",