[ALSA] dynamic minors (3/6): store device-specific object pointers dynamically
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / sound / core / seq / seq_midi.c
index f88d2e3ee66e82f1209368234f205002fe9c92bb..0a65eb2f976b862f8e37fb8c0ff05e8cd168491a 100644 (file)
@@ -183,7 +183,10 @@ static int midisynth_subscribe(void *private_data, struct snd_seq_port_subscribe
        struct snd_rawmidi_params params;
 
        /* open midi port */
-       if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_INPUT, &msynth->input_rfile)) < 0) {
+       if ((err = snd_rawmidi_kernel_open(msynth->card, msynth->device,
+                                          msynth->subdevice,
+                                          SNDRV_RAWMIDI_LFLG_INPUT,
+                                          &msynth->input_rfile)) < 0) {
                snd_printd("midi input open failed!!!\n");
                return err;
        }
@@ -221,7 +224,10 @@ static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info
        struct snd_rawmidi_params params;
 
        /* open midi port */
-       if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_OUTPUT, &msynth->output_rfile)) < 0) {
+       if ((err = snd_rawmidi_kernel_open(msynth->card, msynth->device,
+                                          msynth->subdevice,
+                                          SNDRV_RAWMIDI_LFLG_OUTPUT,
+                                          &msynth->output_rfile)) < 0) {
                snd_printd("midi output open failed!!!\n");
                return err;
        }