[media] smiapp: Set 64-bit integer control using v4l2_ctrl_s_ctrl_int64()
Don't manipulate struct v4l2_ctrl directly. Instead, use v4l2_ctrl_s_ctrl_int64() to change the values. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
e47a81d888
commit
a328e7e3fd
1 changed files with 7 additions and 2 deletions
|
@ -298,8 +298,9 @@ static int smiapp_pll_update(struct smiapp_sensor *sensor)
|
||||||
if (rval < 0)
|
if (rval < 0)
|
||||||
return rval;
|
return rval;
|
||||||
|
|
||||||
*sensor->pixel_rate_parray->p_cur.p_s64 = pll->vt_pix_clk_freq_hz;
|
__v4l2_ctrl_s_ctrl_int64(sensor->pixel_rate_parray,
|
||||||
*sensor->pixel_rate_csi->p_cur.p_s64 = pll->pixel_rate_csi;
|
pll->vt_pix_clk_freq_hz);
|
||||||
|
__v4l2_ctrl_s_ctrl_int64(sensor->pixel_rate_csi, pll->pixel_rate_csi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -509,6 +510,10 @@ static int smiapp_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||||
return smiapp_write(
|
return smiapp_write(
|
||||||
sensor, SMIAPP_REG_U16_TEST_DATA_GREENB, ctrl->val);
|
sensor, SMIAPP_REG_U16_TEST_DATA_GREENB, ctrl->val);
|
||||||
|
|
||||||
|
case V4L2_CID_PIXEL_RATE:
|
||||||
|
/* For v4l2_ctrl_s_ctrl_int64() used internally. */
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue