Commit 9c5e44a0 authored by Julia Lawall's avatar Julia Lawall Committed by Mauro Carvalho Chehab

[media] drivers/media/usb/dvb-usb-v2: constify mxl111sf_demod_config structure

The mxl111sf_demod_config 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>
Reviewed-by: default avatarMichael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent c0a182b6
...@@ -35,7 +35,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able))."); ...@@ -35,7 +35,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able)).");
struct mxl111sf_demod_state { struct mxl111sf_demod_state {
struct mxl111sf_state *mxl_state; struct mxl111sf_state *mxl_state;
struct mxl111sf_demod_config *cfg; const struct mxl111sf_demod_config *cfg;
struct dvb_frontend fe; struct dvb_frontend fe;
}; };
...@@ -579,7 +579,7 @@ static struct dvb_frontend_ops mxl111sf_demod_ops = { ...@@ -579,7 +579,7 @@ static struct dvb_frontend_ops mxl111sf_demod_ops = {
}; };
struct dvb_frontend *mxl111sf_demod_attach(struct mxl111sf_state *mxl_state, struct dvb_frontend *mxl111sf_demod_attach(struct mxl111sf_state *mxl_state,
struct mxl111sf_demod_config *cfg) const struct mxl111sf_demod_config *cfg)
{ {
struct mxl111sf_demod_state *state = NULL; struct mxl111sf_demod_state *state = NULL;
......
...@@ -35,11 +35,11 @@ struct mxl111sf_demod_config { ...@@ -35,11 +35,11 @@ struct mxl111sf_demod_config {
#if IS_ENABLED(CONFIG_DVB_USB_MXL111SF) #if IS_ENABLED(CONFIG_DVB_USB_MXL111SF)
extern extern
struct dvb_frontend *mxl111sf_demod_attach(struct mxl111sf_state *mxl_state, struct dvb_frontend *mxl111sf_demod_attach(struct mxl111sf_state *mxl_state,
struct mxl111sf_demod_config *cfg); const struct mxl111sf_demod_config *cfg);
#else #else
static inline static inline
struct dvb_frontend *mxl111sf_demod_attach(struct mxl111sf_state *mxl_state, struct dvb_frontend *mxl111sf_demod_attach(struct mxl111sf_state *mxl_state,
struct mxl111sf_demod_config *cfg) const struct mxl111sf_demod_config *cfg)
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL; return NULL;
......
...@@ -731,7 +731,7 @@ static int mxl111sf_lg2161_ep6_frontend_attach(struct dvb_usb_adapter *adap, u8 ...@@ -731,7 +731,7 @@ static int mxl111sf_lg2161_ep6_frontend_attach(struct dvb_usb_adapter *adap, u8
return ret; return ret;
} }
static struct mxl111sf_demod_config mxl_demod_config = { static const struct mxl111sf_demod_config mxl_demod_config = {
.read_reg = mxl111sf_read_reg, .read_reg = mxl111sf_read_reg,
.write_reg = mxl111sf_write_reg, .write_reg = mxl111sf_write_reg,
.program_regs = mxl111sf_ctrl_program_regs, .program_regs = mxl111sf_ctrl_program_regs,
......
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