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

Commit b17d7f61 authored by Ivan Evlogiev's avatar Ivan Evlogiev
Browse files

msm-camera: copy move focus result to user space



User space needs update of current lens position in
msm_actuator_cfg_data. So after servicing ioctrl
data needs to be copied from temp data to result
structure, which will be copied to user space in
video_usercopy

Change-Id: I13062015a614f46413fae69b5aee55a0785aba6f
Signed-off-by: default avatarIvan Evlogiev <ivanevlogiev@codeaurora.org>
parent f23eb71e
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -898,6 +898,7 @@ static long msm_actuator_subdev_do_ioctl(
		(struct msm_actuator_cfg_data32 *)arg;
	struct msm_actuator_cfg_data actuator_data;
	void *parg = arg;
	long rc;

	switch (cmd) {
	case VIDIOC_MSM_ACTUATOR_CFG32:
@@ -1003,7 +1004,26 @@ static long msm_actuator_subdev_do_ioctl(
			break;
		}
	}
	return msm_actuator_subdev_ioctl(sd, cmd, parg);

	rc = msm_actuator_subdev_ioctl(sd, cmd, parg);

	switch (cmd) {

	case VIDIOC_MSM_ACTUATOR_CFG:

		switch (u32->cfgtype) {

		case CFG_SET_DEFAULT_FOCUS:
		case CFG_MOVE_FOCUS:
			u32->cfg.move.curr_lens_pos =
				actuator_data.cfg.move.curr_lens_pos;
			break;
		default:
			break;
		}
	}

	return rc;
}

static long msm_actuator_subdev_fops_ioctl(struct file *file, unsigned int cmd,