Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 242c5033 authored by Julia Lawall's avatar Julia Lawall Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 37ecc7b1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ static struct dvb_tuner_ops stv6110x_ops = {
	.release		= stv6110x_release
};

static struct stv6110x_devctl stv6110x_ctl = {
static const struct stv6110x_devctl stv6110x_ctl = {
	.tuner_init		= stv6110x_init,
	.tuner_sleep		= stv6110x_sleep,
	.tuner_set_mode		= stv6110x_set_mode,
@@ -369,7 +369,7 @@ static struct stv6110x_devctl stv6110x_ctl = {
	.tuner_get_status	= stv6110x_get_status,
};

struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
					const struct stv6110x_config *config,
					struct i2c_adapter *i2c)
{
+2 −2
Original line number Diff line number Diff line
@@ -55,12 +55,12 @@ struct stv6110x_devctl {

#if IS_REACHABLE(CONFIG_DVB_STV6110x)

extern struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
extern const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
					       const struct stv6110x_config *config,
					       struct i2c_adapter *i2c);

#else
static inline struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
static inline const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
						      const struct stv6110x_config *config,
						      struct i2c_adapter *i2c)
{
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ struct stv6110x_state {
	const struct stv6110x_config	*config;
	u8 				regs[8];

	struct stv6110x_devctl		*devctl;
	const struct stv6110x_devctl	*devctl;
};

#endif /* __STV6110x_PRIV_H */
+1 −1
Original line number Diff line number Diff line
@@ -690,7 +690,7 @@ static int tuner_attach_stv6110(struct ddb_input *input, int type)
	struct stv090x_config *feconf = type ? &stv0900_aa : &stv0900;
	struct stv6110x_config *tunerconf = (input->nr & 1) ?
		&stv6110b : &stv6110a;
	struct stv6110x_devctl *ctl;
	const struct stv6110x_devctl *ctl;

	ctl = dvb_attach(stv6110x_attach, input->fe, tunerconf, i2c);
	if (!ctl) {
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ static int tuner_attach_stv6110(struct ngene_channel *chan)
		chan->dev->card_info->fe_config[chan->number];
	struct stv6110x_config *tunerconf = (struct stv6110x_config *)
		chan->dev->card_info->tuner_config[chan->number];
	struct stv6110x_devctl *ctl;
	const struct stv6110x_devctl *ctl;

	/* tuner 1+2: i2c adapter #0, tuner 3+4: i2c adapter #1 */
	if (chan->number < 2)
Loading