aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/stv6111.c
diff options
context:
space:
mode:
authorGravatar Daniel Scheller <d.scheller@gmx.net> 2017-07-23 06:13:15 -0400
committerGravatar Mauro Carvalho Chehab <mchehab@s-opensource.com> 2017-08-20 07:20:57 -0400
commit20e671dff9e40fa882574de29be9cc647737aee8 (patch)
treede5f5d1f97f82fa22d8fc8a8c9a36c8da84a24e5 /drivers/media/dvb-frontends/stv6111.c
parentmedia: dvb-frontends/stv6111: cosmetics: comments fixup, misc (diff)
downloadlinux-20e671dff9e40fa882574de29be9cc647737aee8.tar.gz
linux-20e671dff9e40fa882574de29be9cc647737aee8.tar.bz2
linux-20e671dff9e40fa882574de29be9cc647737aee8.zip
media: dvb-frontends/stv{0910,6111}: constify tables
Mark lookup tables and fe_ops things const so the compiler can put them into .rodata. While at it, improve name and identifier strings (moddesc, fe_ops). Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/stv6111.c')
-rw-r--r--drivers/media/dvb-frontends/stv6111.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/dvb-frontends/stv6111.c b/drivers/media/dvb-frontends/stv6111.c
index c4db5e6c18af..9a59fa318207 100644
--- a/drivers/media/dvb-frontends/stv6111.c
+++ b/drivers/media/dvb-frontends/stv6111.c
@@ -41,7 +41,7 @@ struct slookup {
u16 reg_value;
};
-static struct slookup lnagain_nf_lookup[] = {
+static const struct slookup lnagain_nf_lookup[] = {
/* Gain *100dB // Reg */
{ 2572, 0 },
{ 2575, 1 },
@@ -77,7 +77,7 @@ static struct slookup lnagain_nf_lookup[] = {
{ 5102, 31 }
};
-static struct slookup lnagain_iip3_lookup[] = {
+static const struct slookup lnagain_iip3_lookup[] = {
/* Gain *100dB // reg */
{ 1548, 0 },
{ 1552, 1 },
@@ -113,7 +113,7 @@ static struct slookup lnagain_iip3_lookup[] = {
{ 4535, 31 }
};
-static struct slookup gain_rfagc_lookup[] = {
+static const struct slookup gain_rfagc_lookup[] = {
/* Gain *100dB // reg */
{ 4870, 0x3000 },
{ 4850, 0x3C00 },
@@ -173,7 +173,7 @@ static struct slookup gain_rfagc_lookup[] = {
* This table is 6 dB too low comapred to the others (probably created with
* a different BB_MAG setting)
*/
-static struct slookup gain_channel_agc_nf_lookup[] = {
+static const struct slookup gain_channel_agc_nf_lookup[] = {
/* Gain *100dB // reg */
{ 7082, 0x3000 },
{ 7052, 0x4000 },
@@ -232,7 +232,7 @@ static struct slookup gain_channel_agc_nf_lookup[] = {
{ 1927, 0xFF00 }
};
-static struct slookup gain_channel_agc_iip3_lookup[] = {
+static const struct slookup gain_channel_agc_iip3_lookup[] = {
/* Gain *100dB // reg */
{ 7070, 0x3000 },
{ 7028, 0x4000 },
@@ -533,7 +533,8 @@ static int set_params(struct dvb_frontend *fe)
return 0;
}
-static s32 table_lookup(struct slookup *table, int table_size, u16 reg_value)
+static s32 table_lookup(const struct slookup *table,
+ int table_size, u16 reg_value)
{
s32 gain;
s32 reg_diff;
@@ -634,9 +635,9 @@ static int get_rf_strength(struct dvb_frontend *fe, u16 *st)
return 0;
}
-static struct dvb_tuner_ops tuner_ops = {
+static const struct dvb_tuner_ops tuner_ops = {
.info = {
- .name = "STV6111",
+ .name = "ST STV6111",
.frequency_min = 950000,
.frequency_max = 2150000,
.frequency_step = 0
@@ -675,6 +676,6 @@ struct dvb_frontend *stv6111_attach(struct dvb_frontend *fe,
}
EXPORT_SYMBOL_GPL(stv6111_attach);
-MODULE_DESCRIPTION("STV6111 driver");
+MODULE_DESCRIPTION("ST STV6111 satellite tuner driver");
MODULE_AUTHOR("Ralph Metzler, Manfred Voelkel");
MODULE_LICENSE("GPL");