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

Commit e9b8b48a authored by Meera Gande's avatar Meera Gande Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Fix invalid type conversion



Due to improper type conversion compilation
issue will be seen. Made change to access the
appropriate type.

Change-Id: I2c61364f0385c83aa304788cc705bf4ca48ac2cc
Signed-off-by: default avatarMeera Gande <mgande@codeaurora.org>
parent adf55fdf
Loading
Loading
Loading
Loading
+22 −20
Original line number Original line Diff line number Diff line
@@ -212,8 +212,10 @@ static long msm_ispif_cmd_ext(struct v4l2_subdev *sd,
	long rc = 0;
	long rc = 0;
	struct ispif_device *ispif =
	struct ispif_device *ispif =
		(struct ispif_device *)v4l2_get_subdevdata(sd);
		(struct ispif_device *)v4l2_get_subdevdata(sd);
	struct ispif_cfg_data_ext pcdata;
	struct ispif_cfg_data_ext pcdata = {0};
	struct msm_ispif_param_data_ext *params = NULL;
	struct msm_ispif_param_data_ext *params = NULL;

	if (is_compat_task()) {
#ifdef CONFIG_COMPAT
#ifdef CONFIG_COMPAT
		struct ispif_cfg_data_ext_32 *pcdata32 =
		struct ispif_cfg_data_ext_32 *pcdata32 =
			(struct ispif_cfg_data_ext_32 *)arg;
			(struct ispif_cfg_data_ext_32 *)arg;
@@ -225,8 +227,8 @@ static long msm_ispif_cmd_ext(struct v4l2_subdev *sd,
		pcdata.cfg_type  = pcdata32->cfg_type;
		pcdata.cfg_type  = pcdata32->cfg_type;
		pcdata.size = pcdata32->size;
		pcdata.size = pcdata32->size;
		pcdata.data = compat_ptr(pcdata32->data);
		pcdata.data = compat_ptr(pcdata32->data);

#endif
#else
	} else {
		struct ispif_cfg_data_ext *pcdata64 =
		struct ispif_cfg_data_ext *pcdata64 =
		(struct ispif_cfg_data_ext *)arg;
		(struct ispif_cfg_data_ext *)arg;


@@ -237,7 +239,7 @@ static long msm_ispif_cmd_ext(struct v4l2_subdev *sd,
		pcdata.cfg_type  = pcdata64->cfg_type;
		pcdata.cfg_type  = pcdata64->cfg_type;
		pcdata.size = pcdata64->size;
		pcdata.size = pcdata64->size;
		pcdata.data = pcdata64->data;
		pcdata.data = pcdata64->data;
#endif
	}
	if (pcdata.size != sizeof(struct msm_ispif_param_data_ext)) {
	if (pcdata.size != sizeof(struct msm_ispif_param_data_ext)) {
		pr_err("%s: payload size mismatch\n", __func__);
		pr_err("%s: payload size mismatch\n", __func__);
		return -EINVAL;
		return -EINVAL;