From 7b6d92451ad5e1136dc347347e888b94638b8ba9 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 12 Dec 2005 09:33:37 +0100 Subject: [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 --- sound/core/seq/oss/seq_oss_init.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'sound/core/seq/oss') diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index cd4139adec0b..ca5a2ed4d7c3 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -65,33 +65,24 @@ int __init snd_seq_oss_create_client(void) { int rc; - struct snd_seq_client_info *info; struct snd_seq_port_info *port; struct snd_seq_port_callback port_callback; - info = kmalloc(sizeof(*info), GFP_KERNEL); port = kmalloc(sizeof(*port), GFP_KERNEL); - if (!info || !port) { + if (!port) { rc = -ENOMEM; goto __error; } /* create ALSA client */ - rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS); + rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS, + "OSS sequencer"); if (rc < 0) goto __error; system_client = rc; debug_printk(("new client = %d\n", rc)); - /* set client information */ - memset(info, 0, sizeof(*info)); - info->client = system_client; - info->type = KERNEL_CLIENT; - strcpy(info->name, "OSS sequencer"); - - rc = call_ctl(SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, info); - /* look up midi devices */ snd_seq_oss_midi_lookup_ports(system_client); @@ -124,7 +115,6 @@ snd_seq_oss_create_client(void) __error: kfree(port); - kfree(info); return rc; } -- cgit