提交 57eb6799 编写于 作者: T Takashi Iwai

ALSA: firewire: Constify snd_rawmidi_ops

Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi,
we can constify the definitions.
Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 485885b9
...@@ -120,12 +120,12 @@ static void set_midi_substream_names(struct snd_bebob *bebob, ...@@ -120,12 +120,12 @@ static void set_midi_substream_names(struct snd_bebob *bebob,
int snd_bebob_create_midi_devices(struct snd_bebob *bebob) int snd_bebob_create_midi_devices(struct snd_bebob *bebob)
{ {
static struct snd_rawmidi_ops capture_ops = { static const struct snd_rawmidi_ops capture_ops = {
.open = midi_capture_open, .open = midi_capture_open,
.close = midi_capture_close, .close = midi_capture_close,
.trigger = midi_capture_trigger, .trigger = midi_capture_trigger,
}; };
static struct snd_rawmidi_ops playback_ops = { static const struct snd_rawmidi_ops playback_ops = {
.open = midi_playback_open, .open = midi_playback_open,
.close = midi_playback_close, .close = midi_playback_close,
.trigger = midi_playback_trigger, .trigger = midi_playback_trigger,
......
...@@ -91,12 +91,12 @@ static void set_midi_substream_names(struct snd_dice *dice, ...@@ -91,12 +91,12 @@ static void set_midi_substream_names(struct snd_dice *dice,
int snd_dice_create_midi(struct snd_dice *dice) int snd_dice_create_midi(struct snd_dice *dice)
{ {
static struct snd_rawmidi_ops capture_ops = { static const struct snd_rawmidi_ops capture_ops = {
.open = midi_open, .open = midi_open,
.close = midi_close, .close = midi_close,
.trigger = midi_capture_trigger, .trigger = midi_capture_trigger,
}; };
static struct snd_rawmidi_ops playback_ops = { static const struct snd_rawmidi_ops playback_ops = {
.open = midi_open, .open = midi_open,
.close = midi_close, .close = midi_close,
.trigger = midi_playback_trigger, .trigger = midi_playback_trigger,
......
...@@ -148,22 +148,22 @@ static void set_midi_substream_names(struct snd_dg00x *dg00x, ...@@ -148,22 +148,22 @@ static void set_midi_substream_names(struct snd_dg00x *dg00x,
int snd_dg00x_create_midi_devices(struct snd_dg00x *dg00x) int snd_dg00x_create_midi_devices(struct snd_dg00x *dg00x)
{ {
static struct snd_rawmidi_ops phys_capture_ops = { static const struct snd_rawmidi_ops phys_capture_ops = {
.open = midi_phys_open, .open = midi_phys_open,
.close = midi_phys_close, .close = midi_phys_close,
.trigger = midi_phys_capture_trigger, .trigger = midi_phys_capture_trigger,
}; };
static struct snd_rawmidi_ops phys_playback_ops = { static const struct snd_rawmidi_ops phys_playback_ops = {
.open = midi_phys_open, .open = midi_phys_open,
.close = midi_phys_close, .close = midi_phys_close,
.trigger = midi_phys_playback_trigger, .trigger = midi_phys_playback_trigger,
}; };
static struct snd_rawmidi_ops ctl_capture_ops = { static const struct snd_rawmidi_ops ctl_capture_ops = {
.open = midi_ctl_open, .open = midi_ctl_open,
.close = midi_ctl_capture_close, .close = midi_ctl_capture_close,
.trigger = midi_ctl_capture_trigger, .trigger = midi_ctl_capture_trigger,
}; };
static struct snd_rawmidi_ops ctl_playback_ops = { static const struct snd_rawmidi_ops ctl_playback_ops = {
.open = midi_ctl_open, .open = midi_ctl_open,
.close = midi_ctl_playback_close, .close = midi_ctl_playback_close,
.trigger = midi_ctl_playback_trigger, .trigger = midi_ctl_playback_trigger,
......
...@@ -120,12 +120,12 @@ static void set_midi_substream_names(struct snd_efw *efw, ...@@ -120,12 +120,12 @@ static void set_midi_substream_names(struct snd_efw *efw,
int snd_efw_create_midi_devices(struct snd_efw *efw) int snd_efw_create_midi_devices(struct snd_efw *efw)
{ {
static struct snd_rawmidi_ops capture_ops = { static const struct snd_rawmidi_ops capture_ops = {
.open = midi_capture_open, .open = midi_capture_open,
.close = midi_capture_close, .close = midi_capture_close,
.trigger = midi_capture_trigger, .trigger = midi_capture_trigger,
}; };
static struct snd_rawmidi_ops playback_ops = { static const struct snd_rawmidi_ops playback_ops = {
.open = midi_playback_open, .open = midi_playback_open,
.close = midi_playback_close, .close = midi_playback_close,
.trigger = midi_playback_trigger, .trigger = midi_playback_trigger,
......
...@@ -130,12 +130,12 @@ static void set_midi_substream_names(struct snd_oxfw *oxfw, ...@@ -130,12 +130,12 @@ static void set_midi_substream_names(struct snd_oxfw *oxfw,
int snd_oxfw_create_midi(struct snd_oxfw *oxfw) int snd_oxfw_create_midi(struct snd_oxfw *oxfw)
{ {
static struct snd_rawmidi_ops capture_ops = { static const struct snd_rawmidi_ops capture_ops = {
.open = midi_capture_open, .open = midi_capture_open,
.close = midi_capture_close, .close = midi_capture_close,
.trigger = midi_capture_trigger, .trigger = midi_capture_trigger,
}; };
static struct snd_rawmidi_ops playback_ops = { static const struct snd_rawmidi_ops playback_ops = {
.open = midi_playback_open, .open = midi_playback_open,
.close = midi_playback_close, .close = midi_playback_close,
.trigger = midi_playback_trigger, .trigger = midi_playback_trigger,
......
...@@ -297,7 +297,7 @@ static void midi_capture_trigger(struct snd_rawmidi_substream *stream, int up) ...@@ -297,7 +297,7 @@ static void midi_capture_trigger(struct snd_rawmidi_substream *stream, int up)
} }
} }
static struct snd_rawmidi_ops midi_capture_ops = { static const struct snd_rawmidi_ops midi_capture_ops = {
.open = midi_capture_open, .open = midi_capture_open,
.close = midi_capture_close, .close = midi_capture_close,
.trigger = midi_capture_trigger, .trigger = midi_capture_trigger,
...@@ -338,7 +338,7 @@ static void midi_playback_drain(struct snd_rawmidi_substream *stream) ...@@ -338,7 +338,7 @@ static void midi_playback_drain(struct snd_rawmidi_substream *stream)
wait_event(scs->idle_wait, scs->output_idle); wait_event(scs->idle_wait, scs->output_idle);
} }
static struct snd_rawmidi_ops midi_playback_ops = { static const struct snd_rawmidi_ops midi_playback_ops = {
.open = midi_playback_open, .open = midi_playback_open,
.close = midi_playback_close, .close = midi_playback_close,
.trigger = midi_playback_trigger, .trigger = midi_playback_trigger,
......
...@@ -70,12 +70,12 @@ static void midi_playback_trigger(struct snd_rawmidi_substream *substrm, int up) ...@@ -70,12 +70,12 @@ static void midi_playback_trigger(struct snd_rawmidi_substream *substrm, int up)
int snd_tscm_create_midi_devices(struct snd_tscm *tscm) int snd_tscm_create_midi_devices(struct snd_tscm *tscm)
{ {
static struct snd_rawmidi_ops capture_ops = { static const struct snd_rawmidi_ops capture_ops = {
.open = midi_capture_open, .open = midi_capture_open,
.close = midi_capture_close, .close = midi_capture_close,
.trigger = midi_capture_trigger, .trigger = midi_capture_trigger,
}; };
static struct snd_rawmidi_ops playback_ops = { static const struct snd_rawmidi_ops playback_ops = {
.open = midi_playback_open, .open = midi_playback_open,
.close = midi_playback_close, .close = midi_playback_close,
.trigger = midi_playback_trigger, .trigger = midi_playback_trigger,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册