diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-12-12 08:33:37 (GMT) |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 11:30:49 (GMT) |
commit | 7b6d92451ad5e1136dc347347e888b94638b8ba9 (patch) | |
tree | e62edf62f29e988378cd2c984cde0ccb0993120b /sound/isa | |
parent | 83e8ad6984dccd6d848ac91ba0df379ff968180b (diff) | |
download | linux-fsl-qoriq-7b6d92451ad5e1136dc347347e888b94638b8ba9.tar.xz |
[ALSA] seq: set client name in snd_seq_create_kernel_client()
All users of snd_seq_create_kernel_client() have to set the client name
anyway, so we can just pass the name as parameter. This relieves us
from having to muck around with a struct snd_seq_client_info in these
cases.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/gus/gus_synth.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c index 6464488..85a1b05 100644 --- a/sound/isa/gus/gus_synth.c +++ b/sound/isa/gus/gus_synth.c @@ -214,7 +214,6 @@ static int snd_gus_synth_new_device(struct snd_seq_device *dev) { struct snd_gus_card *gus; int client, i; - struct snd_seq_client_info *cinfo; struct snd_seq_port_subscribe sub; struct snd_iwffff_ops *iwops; struct snd_gf1_ops *gf1ops; @@ -227,25 +226,12 @@ static int snd_gus_synth_new_device(struct snd_seq_device *dev) init_MUTEX(&gus->register_mutex); gus->gf1.seq_client = -1; - cinfo = kmalloc(sizeof(*cinfo), GFP_KERNEL); - if (! cinfo) - return -ENOMEM; - /* allocate new client */ client = gus->gf1.seq_client = - snd_seq_create_kernel_client(gus->card, 1); - if (client < 0) { - kfree(cinfo); + snd_seq_create_kernel_client(gus->card, 1, gus->interwave ? + "AMD InterWave" : "GF1"); + if (client < 0) return client; - } - - /* change name of client */ - memset(cinfo, 0, sizeof(*cinfo)); - cinfo->client = client; - cinfo->type = KERNEL_CLIENT; - sprintf(cinfo->name, gus->interwave ? "AMD InterWave" : "GF1"); - snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, cinfo); - kfree(cinfo); for (i = 0; i < 4; i++) snd_gus_synth_create_port(gus, i); |