Commit 8effa6a1 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>

ALSA sequencer,ALSA<-OSS sequencer
use wrapper function for DELETE_PORT ioctl calls
parent 37cbccd3
...@@ -349,18 +349,11 @@ create_port(seq_oss_devinfo_t *dp) ...@@ -349,18 +349,11 @@ create_port(seq_oss_devinfo_t *dp)
static int static int
delete_port(seq_oss_devinfo_t *dp) delete_port(seq_oss_devinfo_t *dp)
{ {
snd_seq_port_info_t port_info;
if (dp->port < 0) if (dp->port < 0)
return 0; return 0;
debug_printk(("delete_port %i\n", dp->port)); debug_printk(("delete_port %i\n", dp->port));
memset(&port_info, 0, sizeof(port_info)); return snd_seq_event_port_detach(dp->cseq, dp->port);
port_info.addr.client = dp->cseq;
port_info.addr.port = dp->port;
return snd_seq_kernel_client_ctl(dp->cseq,
SNDRV_SEQ_IOCTL_DELETE_PORT,
&port_info);
} }
/* /*
......
...@@ -257,17 +257,12 @@ static int midisynth_unuse(void *private_data, snd_seq_port_subscribe_t *info) ...@@ -257,17 +257,12 @@ static int midisynth_unuse(void *private_data, snd_seq_port_subscribe_t *info)
/* delete given midi synth port */ /* delete given midi synth port */
static void snd_seq_midisynth_delete(seq_midisynth_t *msynth) static void snd_seq_midisynth_delete(seq_midisynth_t *msynth)
{ {
snd_seq_port_info_t port;
if (msynth == NULL) if (msynth == NULL)
return; return;
if (msynth->seq_client > 0) { if (msynth->seq_client > 0) {
/* delete port */ /* delete port */
memset(&port, 0, sizeof(port)); snd_seq_event_port_detach(msynth->seq_client, msynth->seq_port);
port.addr.client = msynth->seq_client;
port.addr.port = msynth->seq_port;
snd_seq_kernel_client_ctl(port.addr.client, SNDRV_SEQ_IOCTL_DELETE_PORT, &port);
} }
if (msynth->parser) if (msynth->parser)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment