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: Shiju Mathew <shijum@codeaurora.org>
This commit is contained in:
Shiju Mathew 2016-11-03 17:41:02 -04:00 committed by Gerrit - the friendly Code Review server
parent 6d0ae50f6e
commit fd368e4ce1
2 changed files with 0 additions and 20 deletions

View file

@ -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_input *ba_input = NULL;
struct msm_ba_inst *inst = instance; struct msm_ba_inst *inst = instance;
int status = 0;
int rc = 0; int rc = 0;
if (!inst || !input) if (!inst || !input)
@ -152,16 +151,6 @@ int msm_ba_enum_input(void *instance, struct v4l2_input *input)
else else
input->capabilities = V4L2_IN_CAP_STD; input->capabilities = V4L2_IN_CAP_STD;
dprintk(BA_DBG, "msm_ba_find_input: name %s", input->name); 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; return rc;
} }

View file

@ -189,7 +189,6 @@ void msm_ba_add_inputs(struct v4l2_subdev *sd)
int start_index = 0; int start_index = 0;
int end_index = 0; int end_index = 0;
int dev_id = 0; int dev_id = 0;
int status = 0;
dev_ctxt = get_ba_dev(); dev_ctxt = get_ba_dev();
if (!list_empty(&dev_ctxt->inputs)) if (!list_empty(&dev_ctxt->inputs))
@ -219,14 +218,6 @@ void msm_ba_add_inputs(struct v4l2_subdev *sd)
input->input_user_type = input->input_user_type =
msm_ba_inp_cfg[i].input_user_type; msm_ba_inp_cfg[i].input_user_type;
input->sd = sd; 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); list_add_tail(&input->list, &dev_ctxt->inputs);
dev_ctxt->num_inputs++; dev_ctxt->num_inputs++;
dprintk(BA_DBG, "Add input: name %s on %d", dprintk(BA_DBG, "Add input: name %s on %d",