diff options
author | Max Kellermann <max.kellermann@gmail.com> | 2016-08-10 00:32:21 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-18 20:00:22 +0300 |
commit | bd336e63441bcdeeccca6a698087d913a32478c5 (patch) | |
tree | 97ba66e1581aa595a3704e041e67921c5518e220 /drivers/media/pci | |
parent | c183d3584b1777be55b4c576385143210dc0dbd5 (diff) | |
download | linux-bd336e63441bcdeeccca6a698087d913a32478c5.tar.xz |
[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>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/bt8xx/dst.c | 16 | ||||
-rw-r--r-- | drivers/media/pci/pt1/va1j5jf8007s.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/pt1/va1j5jf8007t.c | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/pci/bt8xx/dst.c b/drivers/media/pci/bt8xx/dst.c index faea3f06e350..7166d2279465 100644 --- a/drivers/media/pci/bt8xx/dst.c +++ b/drivers/media/pci/bt8xx/dst.c @@ -1696,10 +1696,10 @@ static void bt8xx_dst_release(struct dvb_frontend *fe) kfree(state); } -static struct dvb_frontend_ops dst_dvbt_ops; -static struct dvb_frontend_ops dst_dvbs_ops; -static struct dvb_frontend_ops dst_dvbc_ops; -static struct dvb_frontend_ops dst_atsc_ops; +static const struct dvb_frontend_ops dst_dvbt_ops; +static const struct dvb_frontend_ops dst_dvbs_ops; +static const struct dvb_frontend_ops dst_dvbc_ops; +static const struct dvb_frontend_ops dst_atsc_ops; struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter) { @@ -1735,7 +1735,7 @@ struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_ad EXPORT_SYMBOL(dst_attach); -static struct dvb_frontend_ops dst_dvbt_ops = { +static const struct dvb_frontend_ops dst_dvbt_ops = { .delsys = { SYS_DVBT }, .info = { .name = "DST DVB-T", @@ -1764,7 +1764,7 @@ static struct dvb_frontend_ops dst_dvbt_ops = { .read_snr = dst_read_snr, }; -static struct dvb_frontend_ops dst_dvbs_ops = { +static const struct dvb_frontend_ops dst_dvbs_ops = { .delsys = { SYS_DVBS }, .info = { .name = "DST DVB-S", @@ -1793,7 +1793,7 @@ static struct dvb_frontend_ops dst_dvbs_ops = { .set_tone = dst_set_tone, }; -static struct dvb_frontend_ops dst_dvbc_ops = { +static const struct dvb_frontend_ops dst_dvbc_ops = { .delsys = { SYS_DVBC_ANNEX_A }, .info = { .name = "DST DVB-C", @@ -1822,7 +1822,7 @@ static struct dvb_frontend_ops dst_dvbc_ops = { .read_snr = dst_read_snr, }; -static struct dvb_frontend_ops dst_atsc_ops = { +static const struct dvb_frontend_ops dst_atsc_ops = { .delsys = { SYS_ATSC }, .info = { .name = "DST ATSC", diff --git a/drivers/media/pci/pt1/va1j5jf8007s.c b/drivers/media/pci/pt1/va1j5jf8007s.c index d0e70dc0e16f..249273b2e0f2 100644 --- a/drivers/media/pci/pt1/va1j5jf8007s.c +++ b/drivers/media/pci/pt1/va1j5jf8007s.c @@ -578,7 +578,7 @@ static void va1j5jf8007s_release(struct dvb_frontend *fe) kfree(state); } -static struct dvb_frontend_ops va1j5jf8007s_ops = { +static const struct dvb_frontend_ops va1j5jf8007s_ops = { .delsys = { SYS_ISDBS }, .info = { .name = "VA1J5JF8007/VA1J5JF8011 ISDB-S", diff --git a/drivers/media/pci/pt1/va1j5jf8007t.c b/drivers/media/pci/pt1/va1j5jf8007t.c index 0268f20b8097..e0766e69a370 100644 --- a/drivers/media/pci/pt1/va1j5jf8007t.c +++ b/drivers/media/pci/pt1/va1j5jf8007t.c @@ -427,7 +427,7 @@ static void va1j5jf8007t_release(struct dvb_frontend *fe) kfree(state); } -static struct dvb_frontend_ops va1j5jf8007t_ops = { +static const struct dvb_frontend_ops va1j5jf8007t_ops = { .delsys = { SYS_ISDBT }, .info = { .name = "VA1J5JF8007/VA1J5JF8011 ISDB-T", |