Commit 2b83247f authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Mauro Carvalho Chehab

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: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 9722e569
...@@ -342,7 +342,7 @@ static const struct i2c_adapter au0828_i2c_adap_template = { ...@@ -342,7 +342,7 @@ static const struct i2c_adapter au0828_i2c_adap_template = {
.algo = &au0828_i2c_algo_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", .name = "au0828 internal",
}; };
......
...@@ -882,7 +882,7 @@ static const struct i2c_adapter em28xx_adap_template = { ...@@ -882,7 +882,7 @@ static const struct i2c_adapter em28xx_adap_template = {
.algo = &em28xx_algo, .algo = &em28xx_algo,
}; };
static struct i2c_client em28xx_client_template = { static const struct i2c_client em28xx_client_template = {
.name = "em28xx internal", .name = "em28xx internal",
}; };
......
...@@ -246,7 +246,7 @@ static const struct i2c_adapter adap_template = { ...@@ -246,7 +246,7 @@ static const struct i2c_adapter adap_template = {
.algo = &algo, .algo = &algo,
}; };
static struct i2c_client client_template = { static const struct i2c_client client_template = {
.name = "stk1160 internal", .name = "stk1160 internal",
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment