diff options
author | Max Kellermann <max.kellermann@gmail.com> | 2016-08-09 18:32:21 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-18 15:00:22 -0200 |
commit | bd336e63441bcdeeccca6a698087d913a32478c5 (patch) | |
tree | 97ba66e1581aa595a3704e041e67921c5518e220 /drivers/media/dvb-frontends/dvb_dummy_fe.c | |
parent | c183d3584b1777be55b4c576385143210dc0dbd5 (diff) | |
download | op-kernel-dev-bd336e63441bcdeeccca6a698087d913a32478c5.zip op-kernel-dev-bd336e63441bcdeeccca6a698087d913a32478c5.tar.gz |
[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/dvb-frontends/dvb_dummy_fe.c')
-rw-r--r-- | drivers/media/dvb-frontends/dvb_dummy_fe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb-frontends/dvb_dummy_fe.c b/drivers/media/dvb-frontends/dvb_dummy_fe.c index e5bd8c6..efc3c31 100644 --- a/drivers/media/dvb-frontends/dvb_dummy_fe.c +++ b/drivers/media/dvb-frontends/dvb_dummy_fe.c @@ -119,7 +119,7 @@ static void dvb_dummy_fe_release(struct dvb_frontend* fe) kfree(state); } -static struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops; +static const struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops; struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void) { @@ -136,7 +136,7 @@ struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void) return &state->frontend; } -static struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops; +static const struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops; struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void) { @@ -153,7 +153,7 @@ struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void) return &state->frontend; } -static struct dvb_frontend_ops dvb_dummy_fe_qam_ops; +static const struct dvb_frontend_ops dvb_dummy_fe_qam_ops; struct dvb_frontend *dvb_dummy_fe_qam_attach(void) { @@ -170,7 +170,7 @@ struct dvb_frontend *dvb_dummy_fe_qam_attach(void) return &state->frontend; } -static struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops = { +static const struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops = { .delsys = { SYS_DVBT }, .info = { .name = "Dummy DVB-T", @@ -201,7 +201,7 @@ static struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops = { .read_ucblocks = dvb_dummy_fe_read_ucblocks, }; -static struct dvb_frontend_ops dvb_dummy_fe_qam_ops = { +static const struct dvb_frontend_ops dvb_dummy_fe_qam_ops = { .delsys = { SYS_DVBC_ANNEX_A }, .info = { .name = "Dummy DVB-C", @@ -230,7 +230,7 @@ static struct dvb_frontend_ops dvb_dummy_fe_qam_ops = { .read_ucblocks = dvb_dummy_fe_read_ucblocks, }; -static struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops = { +static const struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops = { .delsys = { SYS_DVBS }, .info = { .name = "Dummy DVB-S", |