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

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

This mxl111sf_tuner_config structure is never modified, so declare it as
const.

There are some indentation changes to remain within 80 columns.

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 avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 3defe84a
...@@ -36,7 +36,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able))."); ...@@ -36,7 +36,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able)).");
struct mxl111sf_tuner_state { struct mxl111sf_tuner_state {
struct mxl111sf_state *mxl_state; struct mxl111sf_state *mxl_state;
struct mxl111sf_tuner_config *cfg; const struct mxl111sf_tuner_config *cfg;
enum mxl_if_freq if_freq; enum mxl_if_freq if_freq;
...@@ -489,8 +489,8 @@ static struct dvb_tuner_ops mxl111sf_tuner_tuner_ops = { ...@@ -489,8 +489,8 @@ static struct dvb_tuner_ops mxl111sf_tuner_tuner_ops = {
}; };
struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe, struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe,
struct mxl111sf_state *mxl_state, struct mxl111sf_state *mxl_state,
struct mxl111sf_tuner_config *cfg) const struct mxl111sf_tuner_config *cfg)
{ {
struct mxl111sf_tuner_state *state = NULL; struct mxl111sf_tuner_state *state = NULL;
......
...@@ -63,13 +63,13 @@ struct mxl111sf_tuner_config { ...@@ -63,13 +63,13 @@ struct mxl111sf_tuner_config {
#if IS_ENABLED(CONFIG_DVB_USB_MXL111SF) #if IS_ENABLED(CONFIG_DVB_USB_MXL111SF)
extern extern
struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe, struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe,
struct mxl111sf_state *mxl_state, struct mxl111sf_state *mxl_state,
struct mxl111sf_tuner_config *cfg); const struct mxl111sf_tuner_config *cfg);
#else #else
static inline static inline
struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe, struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe,
struct mxl111sf_state *mxl_state, struct mxl111sf_state *mxl_state,
struct mxl111sf_tuner_config *cfg) const struct mxl111sf_tuner_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;
......
...@@ -856,7 +856,7 @@ static int mxl111sf_ant_hunt(struct dvb_frontend *fe) ...@@ -856,7 +856,7 @@ static int mxl111sf_ant_hunt(struct dvb_frontend *fe)
return 0; return 0;
} }
static struct mxl111sf_tuner_config mxl_tuner_config = { static const struct mxl111sf_tuner_config mxl_tuner_config = {
.if_freq = MXL_IF_6_0, /* applies to external IF output, only */ .if_freq = MXL_IF_6_0, /* applies to external IF output, only */
.invert_spectrum = 0, .invert_spectrum = 0,
.read_reg = mxl111sf_read_reg, .read_reg = mxl111sf_read_reg,
......
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