summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-12-06 10:34:26 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-01 04:31:17 -0500
commit242c5033508991221d787043b734740770c850be (patch)
tree8f1bd6cd33530c6f75313c436247f463180d7d2a
parent37ecc7b1278f4184a6869504f7074b4a54f112c5 (diff)
[media] constify stv6110x_devctl structure
The stv6110x_devctl structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/dvb-frontends/stv6110x.c4
-rw-r--r--drivers/media/dvb-frontends/stv6110x.h4
-rw-r--r--drivers/media/dvb-frontends/stv6110x_priv.h2
-rw-r--r--drivers/media/pci/ddbridge/ddbridge-core.c2
-rw-r--r--drivers/media/pci/ngene/ngene-cards.c2
-rw-r--r--drivers/media/pci/ttpci/budget.c4
-rw-r--r--drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c2
-rw-r--r--drivers/media/usb/dvb-usb/technisat-usb2.c2
8 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/dvb-frontends/stv6110x.c b/drivers/media/dvb-frontends/stv6110x.c
index e66154e5c1d7..a62c01e454f5 100644
--- a/drivers/media/dvb-frontends/stv6110x.c
+++ b/drivers/media/dvb-frontends/stv6110x.c
@@ -355,7 +355,7 @@ static struct dvb_tuner_ops stv6110x_ops = {
355 .release = stv6110x_release 355 .release = stv6110x_release
356}; 356};
357 357
358static struct stv6110x_devctl stv6110x_ctl = { 358static const struct stv6110x_devctl stv6110x_ctl = {
359 .tuner_init = stv6110x_init, 359 .tuner_init = stv6110x_init,
360 .tuner_sleep = stv6110x_sleep, 360 .tuner_sleep = stv6110x_sleep,
361 .tuner_set_mode = stv6110x_set_mode, 361 .tuner_set_mode = stv6110x_set_mode,
@@ -369,7 +369,7 @@ static struct stv6110x_devctl stv6110x_ctl = {
369 .tuner_get_status = stv6110x_get_status, 369 .tuner_get_status = stv6110x_get_status,
370}; 370};
371 371
372struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, 372const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
373 const struct stv6110x_config *config, 373 const struct stv6110x_config *config,
374 struct i2c_adapter *i2c) 374 struct i2c_adapter *i2c)
375{ 375{
diff --git a/drivers/media/dvb-frontends/stv6110x.h b/drivers/media/dvb-frontends/stv6110x.h
index 9f7eb251aec3..696b6e5b9e7b 100644
--- a/drivers/media/dvb-frontends/stv6110x.h
+++ b/drivers/media/dvb-frontends/stv6110x.h
@@ -55,12 +55,12 @@ struct stv6110x_devctl {
55 55
56#if IS_REACHABLE(CONFIG_DVB_STV6110x) 56#if IS_REACHABLE(CONFIG_DVB_STV6110x)
57 57
58extern struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, 58extern const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
59 const struct stv6110x_config *config, 59 const struct stv6110x_config *config,
60 struct i2c_adapter *i2c); 60 struct i2c_adapter *i2c);
61 61
62#else 62#else
63static inline struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, 63static inline const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
64 const struct stv6110x_config *config, 64 const struct stv6110x_config *config,
65 struct i2c_adapter *i2c) 65 struct i2c_adapter *i2c)
66{ 66{
diff --git a/drivers/media/dvb-frontends/stv6110x_priv.h b/drivers/media/dvb-frontends/stv6110x_priv.h
index 0ec936a660a7..a993aba27b7e 100644
--- a/drivers/media/dvb-frontends/stv6110x_priv.h
+++ b/drivers/media/dvb-frontends/stv6110x_priv.h
@@ -70,7 +70,7 @@ struct stv6110x_state {
70 const struct stv6110x_config *config; 70 const struct stv6110x_config *config;
71 u8 regs[8]; 71 u8 regs[8];
72 72
73 struct stv6110x_devctl *devctl; 73 const struct stv6110x_devctl *devctl;
74}; 74};
75 75
76#endif /* __STV6110x_PRIV_H */ 76#endif /* __STV6110x_PRIV_H */
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index 9d5b314142f1..6e995ef8c37e 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -690,7 +690,7 @@ static int tuner_attach_stv6110(struct ddb_input *input, int type)
690 struct stv090x_config *feconf = type ? &stv0900_aa : &stv0900; 690 struct stv090x_config *feconf = type ? &stv0900_aa : &stv0900;
691 struct stv6110x_config *tunerconf = (input->nr & 1) ? 691 struct stv6110x_config *tunerconf = (input->nr & 1) ?
692 &stv6110b : &stv6110a; 692 &stv6110b : &stv6110a;
693 struct stv6110x_devctl *ctl; 693 const struct stv6110x_devctl *ctl;
694 694
695 ctl = dvb_attach(stv6110x_attach, input->fe, tunerconf, i2c); 695 ctl = dvb_attach(stv6110x_attach, input->fe, tunerconf, i2c);
696 if (!ctl) { 696 if (!ctl) {
diff --git a/drivers/media/pci/ngene/ngene-cards.c b/drivers/media/pci/ngene/ngene-cards.c
index 039bed3cc919..4e783a68bf4a 100644
--- a/drivers/media/pci/ngene/ngene-cards.c
+++ b/drivers/media/pci/ngene/ngene-cards.c
@@ -57,7 +57,7 @@ static int tuner_attach_stv6110(struct ngene_channel *chan)
57 chan->dev->card_info->fe_config[chan->number]; 57 chan->dev->card_info->fe_config[chan->number];
58 struct stv6110x_config *tunerconf = (struct stv6110x_config *) 58 struct stv6110x_config *tunerconf = (struct stv6110x_config *)
59 chan->dev->card_info->tuner_config[chan->number]; 59 chan->dev->card_info->tuner_config[chan->number];
60 struct stv6110x_devctl *ctl; 60 const struct stv6110x_devctl *ctl;
61 61
62 /* tuner 1+2: i2c adapter #0, tuner 3+4: i2c adapter #1 */ 62 /* tuner 1+2: i2c adapter #0, tuner 3+4: i2c adapter #1 */
63 if (chan->number < 2) 63 if (chan->number < 2)
diff --git a/drivers/media/pci/ttpci/budget.c b/drivers/media/pci/ttpci/budget.c
index de54310a2660..9f48100227f1 100644
--- a/drivers/media/pci/ttpci/budget.c
+++ b/drivers/media/pci/ttpci/budget.c
@@ -644,7 +644,7 @@ static void frontend_init(struct budget *budget)
644 } 644 }
645 645
646 case 0x101c: { /* TT S2-1600 */ 646 case 0x101c: { /* TT S2-1600 */
647 struct stv6110x_devctl *ctl; 647 const struct stv6110x_devctl *ctl;
648 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); 648 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO);
649 msleep(50); 649 msleep(50);
650 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); 650 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI);
@@ -697,7 +697,7 @@ static void frontend_init(struct budget *budget)
697 break; 697 break;
698 698
699 case 0x1020: { /* Omicom S2 */ 699 case 0x1020: { /* Omicom S2 */
700 struct stv6110x_devctl *ctl; 700 const struct stv6110x_devctl *ctl;
701 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); 701 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO);
702 msleep(50); 702 msleep(50);
703 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); 703 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI);
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
index 69d7fe4471c2..2c0015b1264d 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
@@ -118,7 +118,7 @@ int c8sectpfe_frontend_attach(struct dvb_frontend **fe,
118 struct channel_info *tsin, int chan_num) 118 struct channel_info *tsin, int chan_num)
119{ 119{
120 struct tda18212_config *tda18212; 120 struct tda18212_config *tda18212;
121 struct stv6110x_devctl *fe2; 121 const struct stv6110x_devctl *fe2;
122 struct i2c_client *client; 122 struct i2c_client *client;
123 struct i2c_board_info tda18212_info = { 123 struct i2c_board_info tda18212_info = {
124 .type = "tda18212", 124 .type = "tda18212",
diff --git a/drivers/media/usb/dvb-usb/technisat-usb2.c b/drivers/media/usb/dvb-usb/technisat-usb2.c
index 6c3c47722955..51487d2f7764 100644
--- a/drivers/media/usb/dvb-usb/technisat-usb2.c
+++ b/drivers/media/usb/dvb-usb/technisat-usb2.c
@@ -512,7 +512,7 @@ static int technisat_usb2_frontend_attach(struct dvb_usb_adapter *a)
512 &a->dev->i2c_adap, STV090x_DEMODULATOR_0); 512 &a->dev->i2c_adap, STV090x_DEMODULATOR_0);
513 513
514 if (a->fe_adap[0].fe) { 514 if (a->fe_adap[0].fe) {
515 struct stv6110x_devctl *ctl; 515 const struct stv6110x_devctl *ctl;
516 516
517 ctl = dvb_attach(stv6110x_attach, 517 ctl = dvb_attach(stv6110x_attach,
518 a->fe_adap[0].fe, 518 a->fe_adap[0].fe,