Skip to contentSkip to conversation

media: dvb-bt8xx: Make variable dst_config constant

PATCH New Nishka Dasgupta 1 participant 1 message Aug 19, 2019 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: dvb-bt8xx: Make variable dst_config constant

Static structure dst_config, of type dst_config, is not used except to be assigned as the value of field state of a variable having type dst_state *. In the definition of dst_state, field config is declared as const. Hence dst_config, when assigned to config, cannot be modified. Therefore, make dst_config const as well.
Issue found with Coccinelle.

---
 drivers/media/pci/bt8xx/dvb-bt8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/bt8xx/dvb-bt8xx.c +1 -1
index 64df9d491941..02ebd43e672e 100644
@@ -393,7 +393,7 @@ static struct mt352_config advbt771_samsung_tdtc9251dh0_config = {
 	.demod_init = advbt771_samsung_tdtc9251dh0_demod_init,
 };
 
-static struct dst_config dst_config = {
+static const struct dst_config dst_config = {
 	.demod_address = 0x55,
 };
 
Signature · 1 line
2.19.1