|
@@ -2884,7 +2884,7 @@ static int get_ctrl(struct v4l2_ctrl *ctrl, struct v4l2_ext_control *c)
|
|
|
* cur_to_user() calls below would need to be modified not to access
|
|
|
* userspace memory when called from get_ctrl().
|
|
|
*/
|
|
|
- if (!ctrl->is_int)
|
|
|
+ if (!ctrl->is_int && ctrl->type != V4L2_CTRL_TYPE_INTEGER64)
|
|
|
return -EINVAL;
|
|
|
|
|
|
if (ctrl->flags & V4L2_CTRL_FLAG_WRITE_ONLY)
|
|
@@ -2942,9 +2942,9 @@ s64 v4l2_ctrl_g_ctrl_int64(struct v4l2_ctrl *ctrl)
|
|
|
|
|
|
/* It's a driver bug if this happens. */
|
|
|
WARN_ON(ctrl->is_ptr || ctrl->type != V4L2_CTRL_TYPE_INTEGER64);
|
|
|
- c.value = 0;
|
|
|
+ c.value64 = 0;
|
|
|
get_ctrl(ctrl, &c);
|
|
|
- return c.value;
|
|
|
+ return c.value64;
|
|
|
}
|
|
|
EXPORT_SYMBOL(v4l2_ctrl_g_ctrl_int64);
|
|
|
|