]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: drivers: Constify snd_rawmidi_ops
authorTakashi Iwai <tiwai@suse.de>
Thu, 5 Jan 2017 16:28:39 +0000 (17:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 12 Jan 2017 11:50:06 +0000 (12:50 +0100)
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>
sound/drivers/mpu401/mpu401_uart.c
sound/drivers/mtpav.c
sound/drivers/mts64.c
sound/drivers/portman2x4.c
sound/drivers/serial-u16550.c

index 776596b5ee0570975eb5df3761cf33cc8baf0f9c..3a7c317ae012ab18e1172d5cc795f64db7afb953 100644 (file)
@@ -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,
index 30e8a1d5bc87116db97e19cd1c1e718a69f19d39..00b31f92c504ddf7c7a9810b38d6b411a66a22a3 100644 (file)
@@ -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,
index fd4d18df84d3666c62482c07da0a6cf694f61e47..f32e813422474320551b843f2cff708594930743 100644 (file)
@@ -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
index 189e3e7028af4d8aa6637f57d122d3f7e23fa40b..ec8a94325ef628fe9a036ccaeccaa7ffc969d0c5 100644 (file)
@@ -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,
index 1927b89e1d1f6b2e302da1e4fc7337850906f689..60d51ac4ccfebded6c55e47812fdd16c67ae4359 100644 (file)
@@ -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,