Skip to content

Commit

Permalink
ALSA: drivers: Constify snd_rawmidi_ops
Browse files Browse the repository at this point in the history
Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi,
we can constify the definitions.

Reviewed-by: Takashi Sakamoto <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jan 12, 2017
1 parent c62a570 commit c36f486
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions sound/drivers/mpu401/mpu401_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,14 @@ snd_mpu401_uart_output_trigger(struct snd_rawmidi_substream *substream, int up)
*/

static struct snd_rawmidi_ops snd_mpu401_uart_output =
static const struct snd_rawmidi_ops snd_mpu401_uart_output =
{
.open = snd_mpu401_uart_output_open,
.close = snd_mpu401_uart_output_close,
.trigger = snd_mpu401_uart_output_trigger,
};

static struct snd_rawmidi_ops snd_mpu401_uart_input =
static const struct snd_rawmidi_ops snd_mpu401_uart_input =
{
.open = snd_mpu401_uart_input_open,
.close = snd_mpu401_uart_input_close,
Expand Down
4 changes: 2 additions & 2 deletions sound/drivers/mtpav.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,13 @@ static int snd_mtpav_get_ISA(struct mtpav *mcard)
/*
*/

static struct snd_rawmidi_ops snd_mtpav_output = {
static const struct snd_rawmidi_ops snd_mtpav_output = {
.open = snd_mtpav_output_open,
.close = snd_mtpav_output_close,
.trigger = snd_mtpav_output_trigger,
};

static struct snd_rawmidi_ops snd_mtpav_input = {
static const struct snd_rawmidi_ops snd_mtpav_input = {
.open = snd_mtpav_input_open,
.close = snd_mtpav_input_close,
.trigger = snd_mtpav_input_trigger,
Expand Down
4 changes: 2 additions & 2 deletions sound/drivers/mts64.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,13 +749,13 @@ static void snd_mts64_rawmidi_input_trigger(struct snd_rawmidi_substream *substr
spin_unlock_irqrestore(&mts->lock, flags);
}

static struct snd_rawmidi_ops snd_mts64_rawmidi_output_ops = {
static const struct snd_rawmidi_ops snd_mts64_rawmidi_output_ops = {
.open = snd_mts64_rawmidi_open,
.close = snd_mts64_rawmidi_close,
.trigger = snd_mts64_rawmidi_output_trigger
};

static struct snd_rawmidi_ops snd_mts64_rawmidi_input_ops = {
static const struct snd_rawmidi_ops snd_mts64_rawmidi_input_ops = {
.open = snd_mts64_rawmidi_open,
.close = snd_mts64_rawmidi_close,
.trigger = snd_mts64_rawmidi_input_trigger
Expand Down
4 changes: 2 additions & 2 deletions sound/drivers/portman2x4.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,13 +546,13 @@ static void snd_portman_midi_output_trigger(struct snd_rawmidi_substream *substr
spin_unlock_irqrestore(&pm->reg_lock, flags);
}

static struct snd_rawmidi_ops snd_portman_midi_output = {
static const struct snd_rawmidi_ops snd_portman_midi_output = {
.open = snd_portman_midi_open,
.close = snd_portman_midi_close,
.trigger = snd_portman_midi_output_trigger,
};

static struct snd_rawmidi_ops snd_portman_midi_input = {
static const struct snd_rawmidi_ops snd_portman_midi_input = {
.open = snd_portman_midi_open,
.close = snd_portman_midi_close,
.trigger = snd_portman_midi_input_trigger,
Expand Down
4 changes: 2 additions & 2 deletions sound/drivers/serial-u16550.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,14 +752,14 @@ static void snd_uart16550_output_trigger(struct snd_rawmidi_substream *substream
snd_uart16550_output_write(substream);
}

static struct snd_rawmidi_ops snd_uart16550_output =
static const struct snd_rawmidi_ops snd_uart16550_output =
{
.open = snd_uart16550_output_open,
.close = snd_uart16550_output_close,
.trigger = snd_uart16550_output_trigger,
};

static struct snd_rawmidi_ops snd_uart16550_input =
static const struct snd_rawmidi_ops snd_uart16550_input =
{
.open = snd_uart16550_input_open,
.close = snd_uart16550_input_close,
Expand Down

0 comments on commit c36f486

Please sign in to comment.