aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_midi.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-11-20 08:06:59 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:29:17 -0500
commitf87135f56cb266e031f5ec081dfbde7e43f55e80 (patch)
treec048abae6bb04df53f5d8d7dcffbf2c28bc638ff /sound/core/seq/seq_midi.c
parent6983b7240cd229787c3ee00e663ea94ea649d96a (diff)
[ALSA] dynamic minors (3/6): store device-specific object pointers dynamically
Instead of storing the pointers to the device-specific structures in an array, put them into the struct snd_minor, and look them up dynamically. This makes the device type modules independent of the minor number encoding. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/core/seq/seq_midi.c')
-rw-r--r--sound/core/seq/seq_midi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index f88d2e3ee66e..0a65eb2f976b 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -183,7 +183,10 @@ static int midisynth_subscribe(void *private_data, struct snd_seq_port_subscribe
183 struct snd_rawmidi_params params; 183 struct snd_rawmidi_params params;
184 184
185 /* open midi port */ 185 /* open midi port */
186 if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_INPUT, &msynth->input_rfile)) < 0) { 186 if ((err = snd_rawmidi_kernel_open(msynth->card, msynth->device,
187 msynth->subdevice,
188 SNDRV_RAWMIDI_LFLG_INPUT,
189 &msynth->input_rfile)) < 0) {
187 snd_printd("midi input open failed!!!\n"); 190 snd_printd("midi input open failed!!!\n");
188 return err; 191 return err;
189 } 192 }
@@ -221,7 +224,10 @@ static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info
221 struct snd_rawmidi_params params; 224 struct snd_rawmidi_params params;
222 225
223 /* open midi port */ 226 /* open midi port */
224 if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_OUTPUT, &msynth->output_rfile)) < 0) { 227 if ((err = snd_rawmidi_kernel_open(msynth->card, msynth->device,
228 msynth->subdevice,
229 SNDRV_RAWMIDI_LFLG_OUTPUT,
230 &msynth->output_rfile)) < 0) {
225 snd_printd("midi output open failed!!!\n"); 231 snd_printd("midi output open failed!!!\n");
226 return err; 232 return err;
227 } 233 }