From: Julia Lawall Date: Sat, 27 Oct 2018 12:16:40 +0000 (-0400) Subject: media: ov5645: constify v4l2_ctrl_ops structure X-Git-Tag: v5.0-rc1~182^2~260 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=d148b85e8b0779b910f3120a1b72e3e105ad2c47;p=linux.git media: ov5645: constify v4l2_ctrl_ops structure The v4l2_ctrl_ops structure is only passed as the second argument to functions such as v4l2_ctrl_new_std for which the corresponding parameter is const, so make the v4l2_ctrl_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 5eba8dd7222b..785f326ac519 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -886,7 +886,7 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl) return ret; } -static struct v4l2_ctrl_ops ov5645_ctrl_ops = { +static const struct v4l2_ctrl_ops ov5645_ctrl_ops = { .s_ctrl = ov5645_s_ctrl, };