diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-12-12 03:33:37 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:30:49 -0500 |
commit | 7b6d92451ad5e1136dc347347e888b94638b8ba9 (patch) | |
tree | e62edf62f29e988378cd2c984cde0ccb0993120b /sound/core/seq/oss | |
parent | 83e8ad6984dccd6d848ac91ba0df379ff968180b (diff) |
[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/core/seq/oss')
-rw-r--r-- | sound/core/seq/oss/seq_oss_init.c | 16 |
1 files changed, 3 insertions, 13 deletions
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 | |||
65 | snd_seq_oss_create_client(void) | 65 | snd_seq_oss_create_client(void) |
66 | { | 66 | { |
67 | int rc; | 67 | int rc; |
68 | struct snd_seq_client_info *info; | ||
69 | struct snd_seq_port_info *port; | 68 | struct snd_seq_port_info *port; |
70 | struct snd_seq_port_callback port_callback; | 69 | struct snd_seq_port_callback port_callback; |
71 | 70 | ||
72 | info = kmalloc(sizeof(*info), GFP_KERNEL); | ||
73 | port = kmalloc(sizeof(*port), GFP_KERNEL); | 71 | port = kmalloc(sizeof(*port), GFP_KERNEL); |
74 | if (!info || !port) { | 72 | if (!port) { |
75 | rc = -ENOMEM; | 73 | rc = -ENOMEM; |
76 | goto __error; | 74 | goto __error; |
77 | } | 75 | } |
78 | 76 | ||
79 | /* create ALSA client */ | 77 | /* create ALSA client */ |
80 | rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS); | 78 | rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS, |
79 | "OSS sequencer"); | ||
81 | if (rc < 0) | 80 | if (rc < 0) |
82 | goto __error; | 81 | goto __error; |
83 | 82 | ||
84 | system_client = rc; | 83 | system_client = rc; |
85 | debug_printk(("new client = %d\n", rc)); | 84 | debug_printk(("new client = %d\n", rc)); |
86 | 85 | ||
87 | /* set client information */ | ||
88 | memset(info, 0, sizeof(*info)); | ||
89 | info->client = system_client; | ||
90 | info->type = KERNEL_CLIENT; | ||
91 | strcpy(info->name, "OSS sequencer"); | ||
92 | |||
93 | rc = call_ctl(SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, info); | ||
94 | |||
95 | /* look up midi devices */ | 86 | /* look up midi devices */ |
96 | snd_seq_oss_midi_lookup_ports(system_client); | 87 | snd_seq_oss_midi_lookup_ports(system_client); |
97 | 88 | ||
@@ -124,7 +115,6 @@ snd_seq_oss_create_client(void) | |||
124 | 115 | ||
125 | __error: | 116 | __error: |
126 | kfree(port); | 117 | kfree(port); |
127 | kfree(info); | ||
128 | return rc; | 118 | return rc; |
129 | } | 119 | } |
130 | 120 | ||