diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2017-08-22 22:58:15 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-22 16:08:00 +0200 |
commit | 782fbec745d84fa06708e703a92a431c4344daf0 (patch) | |
tree | bd15cc4bbea9eb7ed05bf9c44a1f995fc2373721 | |
parent | 241bc82e62b28fdb7223b85180fd814f4963c971 (diff) | |
download | op-kernel-dev-782fbec745d84fa06708e703a92a431c4344daf0.zip op-kernel-dev-782fbec745d84fa06708e703a92a431c4344daf0.tar.gz |
ALSA: firewire: add const qualifier to identifiers for read-only symbols
Drivers in ALSA firewire stack still includes some symbols which can be
moved to a section for read-only symbols.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/firewire/bebob/bebob.h | 2 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob_focusrite.c | 6 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob_maudio.c | 2 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob_terratec.c | 2 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob_yamaha_terratec.c | 2 | ||||
-rw-r--r-- | sound/firewire/dice/dice.c | 2 | ||||
-rw-r--r-- | sound/firewire/fireface/ff-protocol-ff400.c | 2 | ||||
-rw-r--r-- | sound/firewire/fireface/ff.c | 2 | ||||
-rw-r--r-- | sound/firewire/fireface/ff.h | 4 | ||||
-rw-r--r-- | sound/firewire/fireworks/fireworks_proc.c | 2 | ||||
-rw-r--r-- | sound/firewire/motu/motu.c | 6 | ||||
-rw-r--r-- | sound/firewire/oxfw/oxfw-scs1x.c | 11 | ||||
-rw-r--r-- | sound/firewire/tascam/tascam.c | 2 |
13 files changed, 22 insertions, 23 deletions
diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h index 17678d6..df1b1e9 100644 --- a/sound/firewire/bebob/bebob.h +++ b/sound/firewire/bebob/bebob.h @@ -58,7 +58,7 @@ enum snd_bebob_clock_type { struct snd_bebob_clock_spec { unsigned int num; const char *const *labels; - enum snd_bebob_clock_type *types; + const enum snd_bebob_clock_type *types; int (*get)(struct snd_bebob *bebob, unsigned int *id); }; struct snd_bebob_rate_spec { diff --git a/sound/firewire/bebob/bebob_focusrite.c b/sound/firewire/bebob/bebob_focusrite.c index f110900..52b8b61 100644 --- a/sound/firewire/bebob/bebob_focusrite.c +++ b/sound/firewire/bebob/bebob_focusrite.c @@ -103,12 +103,12 @@ saffire_write_quad(struct snd_bebob *bebob, u64 offset, u32 value) &data, sizeof(__be32), 0); } -static enum snd_bebob_clock_type saffirepro_10_clk_src_types[] = { +static const enum snd_bebob_clock_type saffirepro_10_clk_src_types[] = { SND_BEBOB_CLOCK_TYPE_INTERNAL, SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */ SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */ }; -static enum snd_bebob_clock_type saffirepro_26_clk_src_types[] = { +static const enum snd_bebob_clock_type saffirepro_26_clk_src_types[] = { SND_BEBOB_CLOCK_TYPE_INTERNAL, SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */ SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* ADAT1 */ @@ -201,7 +201,7 @@ end: } const struct snd_bebob_spec saffire_le_spec; -static enum snd_bebob_clock_type saffire_both_clk_src_types[] = { +static const enum snd_bebob_clock_type saffire_both_clk_src_types[] = { SND_BEBOB_CLOCK_TYPE_INTERNAL, SND_BEBOB_CLOCK_TYPE_EXTERNAL, }; diff --git a/sound/firewire/bebob/bebob_maudio.c b/sound/firewire/bebob/bebob_maudio.c index d10208f..bd55620 100644 --- a/sound/firewire/bebob/bebob_maudio.c +++ b/sound/firewire/bebob/bebob_maudio.c @@ -340,7 +340,7 @@ end: } /* Clock source control for special firmware */ -static enum snd_bebob_clock_type special_clk_types[] = { +static const enum snd_bebob_clock_type special_clk_types[] = { SND_BEBOB_CLOCK_TYPE_INTERNAL, /* With digital mute */ SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* SPDIF/ADAT */ SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */ diff --git a/sound/firewire/bebob/bebob_terratec.c b/sound/firewire/bebob/bebob_terratec.c index 2fdaf93..9770c21 100644 --- a/sound/firewire/bebob/bebob_terratec.c +++ b/sound/firewire/bebob/bebob_terratec.c @@ -8,7 +8,7 @@ #include "./bebob.h" -static enum snd_bebob_clock_type phase88_rack_clk_src_types[] = { +static const enum snd_bebob_clock_type phase88_rack_clk_src_types[] = { SND_BEBOB_CLOCK_TYPE_INTERNAL, SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */ SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */ diff --git a/sound/firewire/bebob/bebob_yamaha_terratec.c b/sound/firewire/bebob/bebob_yamaha_terratec.c index a6be3e7..8bd78fe 100644 --- a/sound/firewire/bebob/bebob_yamaha_terratec.c +++ b/sound/firewire/bebob/bebob_yamaha_terratec.c @@ -31,7 +31,7 @@ * Yamaha GO 44 and GO 46. Yamaha and Terratec had cooperated for these models. */ -static enum snd_bebob_clock_type clk_src_types[] = { +static const enum snd_bebob_clock_type clk_src_types[] = { SND_BEBOB_CLOCK_TYPE_INTERNAL, SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */ }; diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c index 25e9f77..4ddb4cd 100644 --- a/sound/firewire/dice/dice.c +++ b/sound/firewire/dice/dice.c @@ -26,7 +26,7 @@ MODULE_LICENSE("GPL v2"); */ static bool force_two_pcm_support(struct fw_unit *unit) { - const char *const models[] = { + static const char *const models[] = { /* TC Electronic models. */ "StudioKonnekt48", /* Focusrite models. */ diff --git a/sound/firewire/fireface/ff-protocol-ff400.c b/sound/firewire/fireface/ff-protocol-ff400.c index fcec6de..12aa15d 100644 --- a/sound/firewire/fireface/ff-protocol-ff400.c +++ b/sound/firewire/fireface/ff-protocol-ff400.c @@ -356,7 +356,7 @@ static void ff400_dump_clock_config(struct snd_ff *ff, snd_iprintf(buffer, "Sync to clock source: %s\n", src); } -struct snd_ff_protocol snd_ff_protocol_ff400 = { +const struct snd_ff_protocol snd_ff_protocol_ff400 = { .get_clock = ff400_get_clock, .begin_session = ff400_begin_session, .finish_session = ff400_finish_session, diff --git a/sound/firewire/fireface/ff.c b/sound/firewire/fireface/ff.c index eee7c8e..4974bc7 100644 --- a/sound/firewire/fireface/ff.c +++ b/sound/firewire/fireface/ff.c @@ -157,7 +157,7 @@ static void snd_ff_remove(struct fw_unit *unit) } } -static struct snd_ff_spec spec_ff400 = { +static const struct snd_ff_spec spec_ff400 = { .name = "Fireface400", .pcm_capture_channels = {18, 14, 10}, .pcm_playback_channels = {18, 14, 10}, diff --git a/sound/firewire/fireface/ff.h b/sound/firewire/fireface/ff.h index 3cb812a..64df44b 100644 --- a/sound/firewire/fireface/ff.h +++ b/sound/firewire/fireface/ff.h @@ -47,7 +47,7 @@ struct snd_ff_spec { unsigned int midi_in_ports; unsigned int midi_out_ports; - struct snd_ff_protocol *protocol; + const struct snd_ff_protocol *protocol; }; struct snd_ff { @@ -112,7 +112,7 @@ struct snd_ff_protocol { u64 midi_rx_port_1_reg; }; -extern struct snd_ff_protocol snd_ff_protocol_ff400; +extern const struct snd_ff_protocol snd_ff_protocol_ff400; int snd_ff_transaction_register(struct snd_ff *ff); int snd_ff_transaction_reregister(struct snd_ff *ff); diff --git a/sound/firewire/fireworks/fireworks_proc.c b/sound/firewire/fireworks/fireworks_proc.c index beb0a0f..9c21f31 100644 --- a/sound/firewire/fireworks/fireworks_proc.c +++ b/sound/firewire/fireworks/fireworks_proc.c @@ -12,7 +12,7 @@ static inline const char* get_phys_name(struct snd_efw_phys_grp *grp, bool input) { - const char *const ch_type[] = { + static const char *const ch_type[] = { "Analog", "S/PDIF", "ADAT", "S/PDIF or ADAT", "Mirroring", "Headphones", "I2S", "Guitar", "Pirzo Guitar", "Guitar String", }; diff --git a/sound/firewire/motu/motu.c b/sound/firewire/motu/motu.c index 2bbb764..0d6b526 100644 --- a/sound/firewire/motu/motu.c +++ b/sound/firewire/motu/motu.c @@ -194,7 +194,7 @@ static void motu_bus_update(struct fw_unit *unit) snd_motu_transaction_reregister(motu); } -static struct snd_motu_spec motu_828mk2 = { +static const struct snd_motu_spec motu_828mk2 = { .name = "828mk2", .protocol = &snd_motu_protocol_v2, .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | @@ -208,7 +208,7 @@ static struct snd_motu_spec motu_828mk2 = { .analog_out_ports = 8, }; -static struct snd_motu_spec motu_828mk3 = { +static const struct snd_motu_spec motu_828mk3 = { .name = "828mk3", .protocol = &snd_motu_protocol_v3, .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | @@ -225,7 +225,7 @@ static struct snd_motu_spec motu_828mk3 = { .analog_out_ports = 8, }; -static struct snd_motu_spec motu_audio_express = { +static const struct snd_motu_spec motu_audio_express = { .name = "AudioExpress", .protocol = &snd_motu_protocol_v3, .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | diff --git a/sound/firewire/oxfw/oxfw-scs1x.c b/sound/firewire/oxfw/oxfw-scs1x.c index 93209eb..02d5956 100644 --- a/sound/firewire/oxfw/oxfw-scs1x.c +++ b/sound/firewire/oxfw/oxfw-scs1x.c @@ -297,12 +297,6 @@ static void midi_capture_trigger(struct snd_rawmidi_substream *stream, int up) } } -static const struct snd_rawmidi_ops midi_capture_ops = { - .open = midi_capture_open, - .close = midi_capture_close, - .trigger = midi_capture_trigger, -}; - static int midi_playback_open(struct snd_rawmidi_substream *stream) { return 0; @@ -363,6 +357,11 @@ void snd_oxfw_scs1x_update(struct snd_oxfw *oxfw) int snd_oxfw_scs1x_add(struct snd_oxfw *oxfw) { + static const struct snd_rawmidi_ops midi_capture_ops = { + .open = midi_capture_open, + .close = midi_capture_close, + .trigger = midi_capture_trigger, + }; static const struct snd_rawmidi_ops midi_playback_ops = { .open = midi_playback_open, .close = midi_playback_close, diff --git a/sound/firewire/tascam/tascam.c b/sound/firewire/tascam/tascam.c index 9dc93a7..44ad41f 100644 --- a/sound/firewire/tascam/tascam.c +++ b/sound/firewire/tascam/tascam.c @@ -12,7 +12,7 @@ MODULE_DESCRIPTION("TASCAM FireWire series Driver"); MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>"); MODULE_LICENSE("GPL v2"); -static struct snd_tscm_spec model_specs[] = { +static const struct snd_tscm_spec model_specs[] = { { .name = "FW-1884", .has_adat = true, |