Skip to content
Permalink
Browse files

[media] dvb: make DVB frontend *_ops instances "const"

These are immutable.  Making them "const" allows the compiler to move
them to the "rodata" section.

Note that cxd2841er_t_c_ops cannot be made "const", because
cxd2841er_attach() modifies it.  Ouch!

[mchehab@s-opensource.com: fix merge conflicts]
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information...
MaxKellermann authored and mchehab committed Aug 9, 2016
1 parent c183d35 commit bd336e63441bcdeeccca6a698087d913a32478c5
Showing with 165 additions and 165 deletions.
  1. +1 −1 drivers/media/common/siano/smsdvb-main.c
  2. +2 −2 drivers/media/dvb-frontends/af9013.c
  3. +1 −1 drivers/media/dvb-frontends/af9033.c
  4. +1 −1 drivers/media/dvb-frontends/as102_fe.c
  5. +1 −1 drivers/media/dvb-frontends/atbm8830.c
  6. +2 −2 drivers/media/dvb-frontends/au8522_dig.c
  7. +2 −2 drivers/media/dvb-frontends/bcm3510.c
  8. +2 −2 drivers/media/dvb-frontends/cx22700.c
  9. +2 −2 drivers/media/dvb-frontends/cx24110.c
  10. +2 −2 drivers/media/dvb-frontends/cx24116.c
  11. +2 −2 drivers/media/dvb-frontends/cx24117.c
  12. +2 −2 drivers/media/dvb-frontends/cx24120.c
  13. +2 −2 drivers/media/dvb-frontends/cx24123.c
  14. +3 −3 drivers/media/dvb-frontends/cxd2841er.c
  15. +2 −2 drivers/media/dvb-frontends/dib3000mb.c
  16. +2 −2 drivers/media/dvb-frontends/dib3000mc.c
  17. +2 −2 drivers/media/dvb-frontends/dib7000m.c
  18. +2 −2 drivers/media/dvb-frontends/dib7000p.c
  19. +2 −2 drivers/media/dvb-frontends/dib9000.c
  20. +2 −2 drivers/media/dvb-frontends/drx39xyj/drxj.c
  21. +1 −1 drivers/media/dvb-frontends/drxd_hard.c
  22. +1 −1 drivers/media/dvb-frontends/drxk_hard.c
  23. +2 −2 drivers/media/dvb-frontends/ds3000.c
  24. +6 −6 drivers/media/dvb-frontends/dvb_dummy_fe.c
  25. +2 −2 drivers/media/dvb-frontends/ec100.c
  26. +2 −2 drivers/media/dvb-frontends/gp8psk-fe.c
  27. +2 −2 drivers/media/dvb-frontends/hd29l2.c
  28. +2 −2 drivers/media/dvb-frontends/l64781.c
  29. +2 −2 drivers/media/dvb-frontends/lg2160.c
  30. +4 −4 drivers/media/dvb-frontends/lgdt3305.c
  31. +2 −2 drivers/media/dvb-frontends/lgdt3306a.c
  32. +4 −4 drivers/media/dvb-frontends/lgdt330x.c
  33. +2 −2 drivers/media/dvb-frontends/lgs8gl5.c
  34. +1 −1 drivers/media/dvb-frontends/lgs8gxx.c
  35. +2 −2 drivers/media/dvb-frontends/m88ds3103.c
  36. +1 −1 drivers/media/dvb-frontends/m88rs2000.c
  37. +1 −1 drivers/media/dvb-frontends/mb86a16.c
  38. +2 −2 drivers/media/dvb-frontends/mb86a20s.c
  39. +1 −1 drivers/media/dvb-frontends/mn88472.c
  40. +1 −1 drivers/media/dvb-frontends/mt312.c
  41. +2 −2 drivers/media/dvb-frontends/mt352.c
  42. +2 −2 drivers/media/dvb-frontends/nxt200x.c
  43. +2 −2 drivers/media/dvb-frontends/nxt6000.c
  44. +2 −2 drivers/media/dvb-frontends/or51132.c
  45. +2 −2 drivers/media/dvb-frontends/or51211.c
  46. +1 −1 drivers/media/dvb-frontends/rtl2830.c
  47. +1 −1 drivers/media/dvb-frontends/rtl2832.c
  48. +2 −2 drivers/media/dvb-frontends/s5h1409.c
  49. +2 −2 drivers/media/dvb-frontends/s5h1411.c
  50. +2 −2 drivers/media/dvb-frontends/s5h1420.c
  51. +2 −2 drivers/media/dvb-frontends/s5h1432.c
  52. +2 −2 drivers/media/dvb-frontends/s921.c
  53. +1 −1 drivers/media/dvb-frontends/si2165.c
  54. +1 −1 drivers/media/dvb-frontends/si21xx.c
  55. +2 −2 drivers/media/dvb-frontends/sp8870.c
  56. +2 −2 drivers/media/dvb-frontends/sp887x.c
  57. +1 −1 drivers/media/dvb-frontends/stb0899_drv.c
  58. +1 −1 drivers/media/dvb-frontends/stv0288.c
  59. +2 −2 drivers/media/dvb-frontends/stv0297.c
  60. +2 −2 drivers/media/dvb-frontends/stv0299.c
  61. +2 −2 drivers/media/dvb-frontends/stv0367.c
  62. +1 −1 drivers/media/dvb-frontends/stv0900_core.c
  63. +1 −1 drivers/media/dvb-frontends/stv090x.c
  64. +2 −2 drivers/media/dvb-frontends/tda10021.c
  65. +2 −2 drivers/media/dvb-frontends/tda10023.c
  66. +2 −2 drivers/media/dvb-frontends/tda10048.c
  67. +2 −2 drivers/media/dvb-frontends/tda1004x.c
  68. +2 −2 drivers/media/dvb-frontends/tda10071.c
  69. +1 −1 drivers/media/dvb-frontends/tda10086.c
  70. +2 −2 drivers/media/dvb-frontends/tda8083.c
  71. +2 −2 drivers/media/dvb-frontends/ves1820.c
  72. +2 −2 drivers/media/dvb-frontends/ves1x93.c
  73. +2 −2 drivers/media/dvb-frontends/zl10353.c
  74. +8 −8 drivers/media/pci/bt8xx/dst.c
  75. +1 −1 drivers/media/pci/pt1/va1j5jf8007s.c
  76. +1 −1 drivers/media/pci/pt1/va1j5jf8007t.c
  77. +2 −2 drivers/media/tuners/tda8290.c
  78. +1 −1 drivers/media/tuners/tda9887.c
  79. +1 −1 drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c
  80. +2 −2 drivers/media/usb/dvb-usb/af9005-fe.c
  81. +2 −2 drivers/media/usb/dvb-usb/cinergyT2-fe.c
  82. +2 −2 drivers/media/usb/dvb-usb/dtt200u-fe.c
  83. +2 −2 drivers/media/usb/dvb-usb/friio-fe.c
  84. +2 −2 drivers/media/usb/dvb-usb/vp702x-fe.c
  85. +2 −2 drivers/media/usb/dvb-usb/vp7045-fe.c
  86. +4 −4 drivers/media/usb/ttusb-dec/ttusbdecfe.c
@@ -1044,7 +1044,7 @@ static void smsdvb_release(struct dvb_frontend *fe)
/* do nothing */
}

static struct dvb_frontend_ops smsdvb_fe_ops = {
static const struct dvb_frontend_ops smsdvb_fe_ops = {
.info = {
.name = "Siano Mobile Digital MDTV Receiver",
.frequency_min = 44250000,
@@ -1351,7 +1351,7 @@ static void af9013_release(struct dvb_frontend *fe)
kfree(state);
}

static struct dvb_frontend_ops af9013_ops;
static const struct dvb_frontend_ops af9013_ops;

static int af9013_download_firmware(struct af9013_state *state)
{
@@ -1516,7 +1516,7 @@ struct dvb_frontend *af9013_attach(const struct af9013_config *config,
}
EXPORT_SYMBOL(af9013_attach);

static struct dvb_frontend_ops af9013_ops = {
static const struct dvb_frontend_ops af9013_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "Afatech AF9013",
@@ -1198,7 +1198,7 @@ static int af9033_pid_filter(struct dvb_frontend *fe, int index, u16 pid,
return ret;
}

static struct dvb_frontend_ops af9033_ops = {
static const struct dvb_frontend_ops af9033_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "Afatech AF9033 (DVB-T)",
@@ -415,7 +415,7 @@ static void as102_fe_release(struct dvb_frontend *fe)
}


static struct dvb_frontend_ops as102_fe_ops = {
static const struct dvb_frontend_ops as102_fe_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "Abilis AS102 DVB-T",
@@ -428,7 +428,7 @@ static int atbm8830_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
return atbm8830_write_reg(priv, REG_I2C_GATE, enable ? 1 : 0);
}

static struct dvb_frontend_ops atbm8830_ops = {
static const struct dvb_frontend_ops atbm8830_ops = {
.delsys = { SYS_DTMB },
.info = {
.name = "AltoBeam ATBM8830/8831 DMB-TH",
@@ -834,7 +834,7 @@ static int au8522_get_tune_settings(struct dvb_frontend *fe,
return 0;
}

static struct dvb_frontend_ops au8522_ops;
static const struct dvb_frontend_ops au8522_ops;


static void au8522_release(struct dvb_frontend *fe)
@@ -894,7 +894,7 @@ struct dvb_frontend *au8522_attach(const struct au8522_config *config,
}
EXPORT_SYMBOL(au8522_attach);

static struct dvb_frontend_ops au8522_ops = {
static const struct dvb_frontend_ops au8522_ops = {
.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
.info = {
.name = "Auvitek AU8522 QAM/8VSB Frontend",
@@ -788,7 +788,7 @@ static int bcm3510_init(struct dvb_frontend* fe)
}


static struct dvb_frontend_ops bcm3510_ops;
static const struct dvb_frontend_ops bcm3510_ops;

struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config,
struct i2c_adapter *i2c)
@@ -834,7 +834,7 @@ struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config,
}
EXPORT_SYMBOL(bcm3510_attach);

static struct dvb_frontend_ops bcm3510_ops = {
static const struct dvb_frontend_ops bcm3510_ops = {
.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
.info = {
.name = "Broadcom BCM3510 VSB/QAM frontend",
@@ -380,7 +380,7 @@ static void cx22700_release(struct dvb_frontend* fe)
kfree(state);
}

static struct dvb_frontend_ops cx22700_ops;
static const struct dvb_frontend_ops cx22700_ops;

struct dvb_frontend* cx22700_attach(const struct cx22700_config* config,
struct i2c_adapter* i2c)
@@ -408,7 +408,7 @@ struct dvb_frontend* cx22700_attach(const struct cx22700_config* config,
return NULL;
}

static struct dvb_frontend_ops cx22700_ops = {
static const struct dvb_frontend_ops cx22700_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "Conexant CX22700 DVB-T",
@@ -592,7 +592,7 @@ static void cx24110_release(struct dvb_frontend* fe)
kfree(state);
}

static struct dvb_frontend_ops cx24110_ops;
static const struct dvb_frontend_ops cx24110_ops;

struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
struct i2c_adapter* i2c)
@@ -625,7 +625,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
return NULL;
}

static struct dvb_frontend_ops cx24110_ops = {
static const struct dvb_frontend_ops cx24110_ops = {
.delsys = { SYS_DVBS },
.info = {
.name = "Conexant CX24110 DVB-S",
@@ -1116,7 +1116,7 @@ static void cx24116_release(struct dvb_frontend *fe)
kfree(state);
}

static struct dvb_frontend_ops cx24116_ops;
static const struct dvb_frontend_ops cx24116_ops;

struct dvb_frontend *cx24116_attach(const struct cx24116_config *config,
struct i2c_adapter *i2c)
@@ -1467,7 +1467,7 @@ static int cx24116_get_algo(struct dvb_frontend *fe)
return DVBFE_ALGO_HW;
}

static struct dvb_frontend_ops cx24116_ops = {
static const struct dvb_frontend_ops cx24116_ops = {
.delsys = { SYS_DVBS, SYS_DVBS2 },
.info = {
.name = "Conexant CX24116/CX24118",
@@ -1164,7 +1164,7 @@ static void cx24117_release(struct dvb_frontend *fe)
kfree(state);
}

static struct dvb_frontend_ops cx24117_ops;
static const struct dvb_frontend_ops cx24117_ops;

struct dvb_frontend *cx24117_attach(const struct cx24117_config *config,
struct i2c_adapter *i2c)
@@ -1618,7 +1618,7 @@ static int cx24117_get_frontend(struct dvb_frontend *fe,
return 0;
}

static struct dvb_frontend_ops cx24117_ops = {
static const struct dvb_frontend_ops cx24117_ops = {
.delsys = { SYS_DVBS, SYS_DVBS2 },
.info = {
.name = "Conexant CX24117/CX24132",
@@ -267,7 +267,7 @@ static int cx24120_writeregs(struct cx24120_state *state,
return ret;
}

static struct dvb_frontend_ops cx24120_ops;
static const struct dvb_frontend_ops cx24120_ops;

struct dvb_frontend *cx24120_attach(const struct cx24120_config *config,
struct i2c_adapter *i2c)
@@ -1551,7 +1551,7 @@ static int cx24120_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
return 0;
}

static struct dvb_frontend_ops cx24120_ops = {
static const struct dvb_frontend_ops cx24120_ops = {
.delsys = { SYS_DVBS, SYS_DVBS2 },
.info = {
.name = "Conexant CX24120/CX24118",
@@ -1049,7 +1049,7 @@ struct i2c_adapter *
}
EXPORT_SYMBOL(cx24123_get_tuner_i2c_adapter);

static struct dvb_frontend_ops cx24123_ops;
static const struct dvb_frontend_ops cx24123_ops;

struct dvb_frontend *cx24123_attach(const struct cx24123_config *config,
struct i2c_adapter *i2c)
@@ -1111,7 +1111,7 @@ struct dvb_frontend *cx24123_attach(const struct cx24123_config *config,
}
EXPORT_SYMBOL(cx24123_attach);

static struct dvb_frontend_ops cx24123_ops = {
static const struct dvb_frontend_ops cx24123_ops = {
.delsys = { SYS_DVBS },
.info = {
.name = "Conexant CX24123/CX24109",
@@ -3719,7 +3719,7 @@ static int cxd2841er_init_tc(struct dvb_frontend *fe)
return 0;
}

static struct dvb_frontend_ops cxd2841er_dvbs_s2_ops;
static const struct dvb_frontend_ops cxd2841er_dvbs_s2_ops;
static struct dvb_frontend_ops cxd2841er_t_c_ops;

static struct dvb_frontend *cxd2841er_attach(struct cxd2841er_config *cfg,
@@ -3801,7 +3801,7 @@ struct dvb_frontend *cxd2841er_attach_t_c(struct cxd2841er_config *cfg,
}
EXPORT_SYMBOL(cxd2841er_attach_t_c);

static struct dvb_frontend_ops cxd2841er_dvbs_s2_ops = {
static const struct dvb_frontend_ops cxd2841er_dvbs_s2_ops = {
.delsys = { SYS_DVBS, SYS_DVBS2 },
.info = {
.name = "Sony CXD2841ER DVB-S/S2 demodulator",
@@ -3829,7 +3829,7 @@ static struct dvb_frontend_ops cxd2841er_dvbs_s2_ops = {
.tune = cxd2841er_tune_s
};

static struct dvb_frontend_ops cxd2841er_t_c_ops = {
static struct dvb_frontend_ops cxd2841er_t_c_ops = {
.delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A },
.info = {
.name = "", /* will set in attach function */
@@ -742,7 +742,7 @@ static int dib3000mb_tuner_pass_ctrl(struct dvb_frontend *fe, int onoff, u8 pll_
return 0;
}

static struct dvb_frontend_ops dib3000mb_ops;
static const struct dvb_frontend_ops dib3000mb_ops;

struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops)
@@ -782,7 +782,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
return NULL;
}

static struct dvb_frontend_ops dib3000mb_ops = {
static const struct dvb_frontend_ops dib3000mb_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "DiBcom 3000M-B DVB-T",
@@ -879,7 +879,7 @@ int dib3000mc_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 defa
}
EXPORT_SYMBOL(dib3000mc_i2c_enumeration);

static struct dvb_frontend_ops dib3000mc_ops;
static const struct dvb_frontend_ops dib3000mc_ops;

struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib3000mc_config *cfg)
{
@@ -912,7 +912,7 @@ struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr
}
EXPORT_SYMBOL(dib3000mc_attach);

static struct dvb_frontend_ops dib3000mc_ops = {
static const struct dvb_frontend_ops dib3000mc_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "DiBcom 3000MC/P",
@@ -1401,7 +1401,7 @@ int dib7000m_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods,
EXPORT_SYMBOL(dib7000m_i2c_enumeration);
#endif

static struct dvb_frontend_ops dib7000m_ops;
static const struct dvb_frontend_ops dib7000m_ops;
struct dvb_frontend * dib7000m_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib7000m_config *cfg)
{
struct dvb_frontend *demod;
@@ -1439,7 +1439,7 @@ struct dvb_frontend * dib7000m_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr,
}
EXPORT_SYMBOL(dib7000m_attach);

static struct dvb_frontend_ops dib7000m_ops = {
static const struct dvb_frontend_ops dib7000m_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "DiBcom 7000MA/MB/PA/PB/MC",
@@ -2721,7 +2721,7 @@ static int dib7090_slave_reset(struct dvb_frontend *fe)
return 0;
}

static struct dvb_frontend_ops dib7000p_ops;
static const struct dvb_frontend_ops dib7000p_ops;
static struct dvb_frontend *dib7000p_init(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib7000p_config *cfg)
{
struct dvb_frontend *demod;
@@ -2811,7 +2811,7 @@ void *dib7000p_attach(struct dib7000p_ops *ops)
}
EXPORT_SYMBOL(dib7000p_attach);

static struct dvb_frontend_ops dib7000p_ops = {
static const struct dvb_frontend_ops dib7000p_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "DiBcom 7000PC",
@@ -2490,7 +2490,7 @@ struct dvb_frontend *dib9000_get_slave_frontend(struct dvb_frontend *fe, int sla
}
EXPORT_SYMBOL(dib9000_get_slave_frontend);

static struct dvb_frontend_ops dib9000_ops;
static const struct dvb_frontend_ops dib9000_ops;
struct dvb_frontend *dib9000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, const struct dib9000_config *cfg)
{
struct dvb_frontend *fe;
@@ -2567,7 +2567,7 @@ struct dvb_frontend *dib9000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, c
}
EXPORT_SYMBOL(dib9000_attach);

static struct dvb_frontend_ops dib9000_ops = {
static const struct dvb_frontend_ops dib9000_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "DiBcom 9000",
@@ -12264,7 +12264,7 @@ static void drx39xxj_release(struct dvb_frontend *fe)
kfree(state);
}

static struct dvb_frontend_ops drx39xxj_ops;
static const struct dvb_frontend_ops drx39xxj_ops;

struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
{
@@ -12363,7 +12363,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
}
EXPORT_SYMBOL(drx39xxj_attach);

static struct dvb_frontend_ops drx39xxj_ops = {
static const struct dvb_frontend_ops drx39xxj_ops = {
.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
.info = {
.name = "Micronas DRX39xxj family Frontend",
@@ -2912,7 +2912,7 @@ static void drxd_release(struct dvb_frontend *fe)
kfree(state);
}

static struct dvb_frontend_ops drxd_ops = {
static const struct dvb_frontend_ops drxd_ops = {
.delsys = { SYS_DVBT},
.info = {
.name = "Micronas DRXD DVB-T",
@@ -6737,7 +6737,7 @@ static int drxk_get_tune_settings(struct dvb_frontend *fe,
}
}

static struct dvb_frontend_ops drxk_ops = {
static const struct dvb_frontend_ops drxk_ops = {
/* .delsys will be filled dynamically */
.info = {
.name = "DRXK",
@@ -830,7 +830,7 @@ static void ds3000_release(struct dvb_frontend *fe)
kfree(state);
}

static struct dvb_frontend_ops ds3000_ops;
static const struct dvb_frontend_ops ds3000_ops;

struct dvb_frontend *ds3000_attach(const struct ds3000_config *config,
struct i2c_adapter *i2c)
@@ -1104,7 +1104,7 @@ static int ds3000_initfe(struct dvb_frontend *fe)
return 0;
}

static struct dvb_frontend_ops ds3000_ops = {
static const struct dvb_frontend_ops ds3000_ops = {
.delsys = { SYS_DVBS, SYS_DVBS2 },
.info = {
.name = "Montage Technology DS3000",
Oops, something went wrong.

0 comments on commit bd336e6

Please sign in to comment.
You can’t perform that action at this time.