diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2014-06-11 09:37:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-21 16:25:27 -0400 |
commit | a328e7e3fd3030974b74da51daee625a14be0435 (patch) | |
tree | f8b4b64a3e262cdc3b5f86a06e35e018ace102d4 /drivers/media/i2c | |
parent | e47a81d8886d0262f9f6a4ecf7aa7e6ba2cb0dfc (diff) |
[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>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 9 |
1 files changed, 7 insertions, 2 deletions
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) | |||
298 | if (rval < 0) | 298 | if (rval < 0) |
299 | return rval; | 299 | return rval; |
300 | 300 | ||
301 | *sensor->pixel_rate_parray->p_cur.p_s64 = pll->vt_pix_clk_freq_hz; | 301 | __v4l2_ctrl_s_ctrl_int64(sensor->pixel_rate_parray, |
302 | *sensor->pixel_rate_csi->p_cur.p_s64 = pll->pixel_rate_csi; | 302 | pll->vt_pix_clk_freq_hz); |
303 | __v4l2_ctrl_s_ctrl_int64(sensor->pixel_rate_csi, pll->pixel_rate_csi); | ||
303 | 304 | ||
304 | return 0; | 305 | return 0; |
305 | } | 306 | } |
@@ -509,6 +510,10 @@ static int smiapp_set_ctrl(struct v4l2_ctrl *ctrl) | |||
509 | return smiapp_write( | 510 | return smiapp_write( |
510 | sensor, SMIAPP_REG_U16_TEST_DATA_GREENB, ctrl->val); | 511 | sensor, SMIAPP_REG_U16_TEST_DATA_GREENB, ctrl->val); |
511 | 512 | ||
513 | case V4L2_CID_PIXEL_RATE: | ||
514 | /* For v4l2_ctrl_s_ctrl_int64() used internally. */ | ||
515 | return 0; | ||
516 | |||
512 | default: | 517 | default: |
513 | return -EINVAL; | 518 | return -EINVAL; |
514 | } | 519 | } |