From: Sakari Ailus Date: Wed, 11 Jun 2014 13:37:36 +0000 (-0300) Subject: [media] smiapp: Set 64-bit integer control using v4l2_ctrl_s_ctrl_int64() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a328e7e3fd3030974b74da51daee625a14be0435;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index bf8d3380111a..c4cc5de3ae59 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -298,8 +298,9 @@ static int smiapp_pll_update(struct smiapp_sensor *sensor) if (rval < 0) return rval; - *sensor->pixel_rate_parray->p_cur.p_s64 = pll->vt_pix_clk_freq_hz; - *sensor->pixel_rate_csi->p_cur.p_s64 = pll->pixel_rate_csi; + __v4l2_ctrl_s_ctrl_int64(sensor->pixel_rate_parray, + pll->vt_pix_clk_freq_hz); + __v4l2_ctrl_s_ctrl_int64(sensor->pixel_rate_csi, pll->pixel_rate_csi); return 0; } @@ -509,6 +510,10 @@ static int smiapp_set_ctrl(struct v4l2_ctrl *ctrl) return smiapp_write( 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: return -EINVAL; }