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

Commit b1e0a837 authored by Soundrapandian Jeyaprakash's avatar Soundrapandian Jeyaprakash Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: sanitize the camera sensor driver" into dev/msm-4.9-camx

parents 58f152fb 63045555
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ static int32_t cam_flash_driver_cmd(struct cam_flash_ctrl *fctrl,
		break;
	}
	case CAM_QUERY_CAP: {
		struct cam_flash_query_cap_info flash_cap;
		struct cam_flash_query_cap_info flash_cap = {0};

		CAM_DBG(CAM_FLASH, "CAM_QUERY_CAP");
		flash_cap.slot_info = fctrl->soc_info.index;
+8 −3
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@ int32_t msm_camera_fill_vreg_params(

	num_vreg = soc_info->num_rgltr;

	if (num_vreg <= 0) {
	if ((num_vreg <= 0) || (num_vreg >= CAM_SOC_MAX_REGULATOR)) {
		CAM_ERR(CAM_SENSOR, "failed: num_vreg %d", num_vreg);
		return -EINVAL;
	}
@@ -1210,8 +1210,8 @@ int cam_sensor_core_power_up(struct cam_sensor_power_ctrl_t *ctrl,
	gpio_num_info = ctrl->gpio_num_info;
	num_vreg = soc_info->num_rgltr;

	if ((num_vreg == 0) || (num_vreg > CAM_SOC_MAX_REGULATOR)) {
		CAM_ERR(CAM_SENSOR, "Regulators are not initialized");
	if ((num_vreg <= 0) || (num_vreg >= CAM_SOC_MAX_REGULATOR)) {
		CAM_ERR(CAM_SENSOR, "failed: num_vreg %d", num_vreg);
		return -EINVAL;
	}

@@ -1556,6 +1556,11 @@ int msm_camera_power_down(struct cam_sensor_power_ctrl_t *ctrl,
	gpio_num_info = ctrl->gpio_num_info;
	num_vreg = soc_info->num_rgltr;

	if ((num_vreg <= 0) || (num_vreg >= CAM_SOC_MAX_REGULATOR)) {
		CAM_ERR(CAM_SENSOR, "failed: num_vreg %d", num_vreg);
		return -EINVAL;
	}

	for (index = 0; index < ctrl->power_down_setting_size; index++) {
		CAM_DBG(CAM_SENSOR, "index %d",  index);
		pd = &ctrl->power_down_setting[index];