summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx
diff options
context:
space:
mode:
authorBhumika Goyal2017-08-28 09:21:35 +0200
committerMauro Carvalho Chehab2017-09-23 14:27:42 +0200
commit2b83247f3e4a40c767dcbc149b7ad544e2e6c002 (patch)
tree151bafe2bf0f3a6614547bf56dec696e78e09ef9 /drivers/media/usb/em28xx
parentmedia: dvb-frontends: delete jump targets (diff)
downloadkernel-qcow2-linux-2b83247f3e4a40c767dcbc149b7ad544e2e6c002.tar.gz
kernel-qcow2-linux-2b83247f3e4a40c767dcbc149b7ad544e2e6c002.tar.xz
kernel-qcow2-linux-2b83247f3e4a40c767dcbc149b7ad544e2e6c002.zip
media: usb: make i2c_client const
Make these const as they are only used in a copy operation. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct i2c_client s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ position ref.p; identifier match.s,f,c; expression e; @@ ( e = s@p | e = s@p.f | c(...,s@p.f,...) | c(...,s@p,...) ) @bad depends on !good1@ position ref.p; identifier match.s; @@ s@p @depends on forall !bad disable optional_qualifier@ identifier match.s; @@ static + const struct i2c_client s; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/em28xx')
-rw-r--r--drivers/media/usb/em28xx/em28xx-i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c
index 66c5012a628a..9bf49d666e5a 100644
--- a/drivers/media/usb/em28xx/em28xx-i2c.c
+++ b/drivers/media/usb/em28xx/em28xx-i2c.c
@@ -882,7 +882,7 @@ static const struct i2c_adapter em28xx_adap_template = {
.algo = &em28xx_algo,
};
-static struct i2c_client em28xx_client_template = {
+static const struct i2c_client em28xx_client_template = {
.name = "em28xx internal",
};