diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2017-08-28 03:21:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-23 08:27:42 -0400 |
commit | 2b83247f3e4a40c767dcbc149b7ad544e2e6c002 (patch) | |
tree | 151bafe2bf0f3a6614547bf56dec696e78e09ef9 /drivers/media/usb/au0828 | |
parent | 9722e5696ca729044462c4456ddde90061809f7e (diff) | |
download | linux-stable-2b83247f3e4a40c767dcbc149b7ad544e2e6c002.tar.gz linux-stable-2b83247f3e4a40c767dcbc149b7ad544e2e6c002.tar.bz2 linux-stable-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/au0828')
-rw-r--r-- | drivers/media/usb/au0828/au0828-i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c index ef7d1b830ca3..1b8ec5d9e7ab 100644 --- a/drivers/media/usb/au0828/au0828-i2c.c +++ b/drivers/media/usb/au0828/au0828-i2c.c @@ -342,7 +342,7 @@ static const struct i2c_adapter au0828_i2c_adap_template = { .algo = &au0828_i2c_algo_template, }; -static struct i2c_client au0828_i2c_client_template = { +static const struct i2c_client au0828_i2c_client_template = { .name = "au0828 internal", }; |