From: Julia Lawall <Julia.Lawall@lip6.fr> To: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] media: ov5645: constify v4l2_ctrl_ops structure Date: Sat, 27 Oct 2018 14:16:40 +0200 [thread overview] Message-ID: <1540642600-25840-3-git-send-email-Julia.Lawall@lip6.fr> (raw) In-Reply-To: <1540642600-25840-1-git-send-email-Julia.Lawall@lip6.fr> 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 <Julia.Lawall@lip6.fr> --- drivers/media/i2c/ov5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -u -p a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -886,7 +886,7 @@ static int ov5645_s_ctrl(struct v4l2_ctr return ret; } -static struct v4l2_ctrl_ops ov5645_ctrl_ops = { +static const struct v4l2_ctrl_ops ov5645_ctrl_ops = { .s_ctrl = ov5645_s_ctrl, };
WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr> To: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] media: ov5645: constify v4l2_ctrl_ops structure Date: Sat, 27 Oct 2018 12:16:40 +0000 [thread overview] Message-ID: <1540642600-25840-3-git-send-email-Julia.Lawall@lip6.fr> (raw) In-Reply-To: <1540642600-25840-1-git-send-email-Julia.Lawall@lip6.fr> 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 <Julia.Lawall@lip6.fr> --- drivers/media/i2c/ov5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -u -p a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -886,7 +886,7 @@ static int ov5645_s_ctrl(struct v4l2_ctr return ret; } -static struct v4l2_ctrl_ops ov5645_ctrl_ops = { +static const struct v4l2_ctrl_ops ov5645_ctrl_ops = { .s_ctrl = ov5645_s_ctrl, };
next prev parent reply other threads:[~2018-10-27 12:52 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-27 12:16 [PATCH 0/2] constify v4l2_ctrl_ops structures Julia Lawall 2018-10-27 12:16 ` Julia Lawall 2018-10-27 12:16 ` [PATCH 1/2] media: vicodec: constify v4l2_ctrl_ops structure Julia Lawall 2018-10-27 12:16 ` Julia Lawall 2018-10-27 12:16 ` Julia Lawall [this message] 2018-10-27 12:16 ` [PATCH 2/2] media: ov5645: " Julia Lawall
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1540642600-25840-3-git-send-email-Julia.Lawall@lip6.fr \ --to=julia.lawall@lip6.fr \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=mchehab@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.