mirror of https://gitee.com/openkylin/linux.git
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: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
485885b9d0
commit
57eb67994a
|
@ -120,12 +120,12 @@ static void set_midi_substream_names(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,
|
||||
.close = midi_capture_close,
|
||||
.trigger = midi_capture_trigger,
|
||||
};
|
||||
static struct snd_rawmidi_ops playback_ops = {
|
||||
static const struct snd_rawmidi_ops playback_ops = {
|
||||
.open = midi_playback_open,
|
||||
.close = midi_playback_close,
|
||||
.trigger = midi_playback_trigger,
|
||||
|
|
|
@ -91,12 +91,12 @@ static void set_midi_substream_names(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,
|
||||
.close = midi_close,
|
||||
.trigger = midi_capture_trigger,
|
||||
};
|
||||
static struct snd_rawmidi_ops playback_ops = {
|
||||
static const struct snd_rawmidi_ops playback_ops = {
|
||||
.open = midi_open,
|
||||
.close = midi_close,
|
||||
.trigger = midi_playback_trigger,
|
||||
|
|
|
@ -148,22 +148,22 @@ static void set_midi_substream_names(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,
|
||||
.close = midi_phys_close,
|
||||
.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,
|
||||
.close = midi_phys_close,
|
||||
.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,
|
||||
.close = midi_ctl_capture_close,
|
||||
.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,
|
||||
.close = midi_ctl_playback_close,
|
||||
.trigger = midi_ctl_playback_trigger,
|
||||
|
|
|
@ -120,12 +120,12 @@ static void set_midi_substream_names(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,
|
||||
.close = midi_capture_close,
|
||||
.trigger = midi_capture_trigger,
|
||||
};
|
||||
static struct snd_rawmidi_ops playback_ops = {
|
||||
static const struct snd_rawmidi_ops playback_ops = {
|
||||
.open = midi_playback_open,
|
||||
.close = midi_playback_close,
|
||||
.trigger = midi_playback_trigger,
|
||||
|
|
|
@ -130,12 +130,12 @@ static void set_midi_substream_names(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,
|
||||
.close = midi_capture_close,
|
||||
.trigger = midi_capture_trigger,
|
||||
};
|
||||
static struct snd_rawmidi_ops playback_ops = {
|
||||
static const struct snd_rawmidi_ops playback_ops = {
|
||||
.open = midi_playback_open,
|
||||
.close = midi_playback_close,
|
||||
.trigger = midi_playback_trigger,
|
||||
|
|
|
@ -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,
|
||||
.close = midi_capture_close,
|
||||
.trigger = midi_capture_trigger,
|
||||
|
@ -338,7 +338,7 @@ static void midi_playback_drain(struct snd_rawmidi_substream *stream)
|
|||
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,
|
||||
.close = midi_playback_close,
|
||||
.trigger = midi_playback_trigger,
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
static struct snd_rawmidi_ops capture_ops = {
|
||||
static const struct snd_rawmidi_ops capture_ops = {
|
||||
.open = midi_capture_open,
|
||||
.close = midi_capture_close,
|
||||
.trigger = midi_capture_trigger,
|
||||
};
|
||||
static struct snd_rawmidi_ops playback_ops = {
|
||||
static const struct snd_rawmidi_ops playback_ops = {
|
||||
.open = midi_playback_open,
|
||||
.close = midi_playback_close,
|
||||
.trigger = midi_playback_trigger,
|
||||
|
|
Loading…
Reference in New Issue