Skip to contentSkip to conversation

pci: mantis: constify mb86a16_config structure

PATCH New Bhumika Goyal 1 participant 1 message Feb 19, 2017 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: mantis: constify mb86a16_config structure

Declare mb86a16_config structure as const as it is either passed as an argument to the function dvb_attach or is dereferenced. dvb_attach calls its first argument on the rest of its arguments. The first argument of dvb_attach in the changed case is mb86a16_attach and the parameter of this function to which the object reference is passed is of type const. So, mb86a16_config structures having this property can be made const.

---
 drivers/media/pci/mantis/mantis_vp1034.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/mantis/mantis_vp1034.c +1 -1
index 3b19285..e4972ff 100644
@@ -36,7 +36,7 @@
 #include "mantis_vp1034.h"
 #include "mantis_reg.h"
 
-static struct mb86a16_config vp1034_mb86a16_config = {
+static const struct mb86a16_config vp1034_mb86a16_config = {
 	.demod_address	= 0x08,
 	.set_voltage	= vp1034_set_voltage,
 };
Signature · 1 line
1.9.1