summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-12-12 08:33:37 (GMT)
committerJaroslav Kysela <perex@suse.cz>2006-01-03 11:30:49 (GMT)
commit7b6d92451ad5e1136dc347347e888b94638b8ba9 (patch)
treee62edf62f29e988378cd2c984cde0ccb0993120b /sound/pci
parent83e8ad6984dccd6d848ac91ba0df379ff968180b (diff)
downloadlinux-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/pci')
-rw-r--r--sound/pci/trident/trident_synth.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c
index e31055a..cc7af8b 100644
--- a/sound/pci/trident/trident_synth.c
+++ b/sound/pci/trident/trident_synth.c
@@ -934,7 +934,6 @@ static int snd_trident_synth_new_device(struct snd_seq_device *dev)
{
struct snd_trident *trident;
int client, i;
- struct snd_seq_client_info cinfo;
struct snd_seq_port_subscribe sub;
struct snd_simple_ops *simpleops;
char *str;
@@ -946,23 +945,16 @@ static int snd_trident_synth_new_device(struct snd_seq_device *dev)
trident->synth.seq_client = -1;
/* allocate new client */
- client = trident->synth.seq_client =
- snd_seq_create_kernel_client(trident->card, 1);
- if (client < 0)
- return client;
-
- /* change name of client */
- memset(&cinfo, 0, sizeof(cinfo));
- cinfo.client = client;
- cinfo.type = KERNEL_CLIENT;
str = "???";
switch (trident->device) {
case TRIDENT_DEVICE_ID_DX: str = "Trident 4DWave-DX"; break;
case TRIDENT_DEVICE_ID_NX: str = "Trident 4DWave-NX"; break;
case TRIDENT_DEVICE_ID_SI7018: str = "SiS 7018"; break;
}
- sprintf(cinfo.name, str);
- snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
+ client = trident->synth.seq_client =
+ snd_seq_create_kernel_client(trident->card, 1, str);
+ if (client < 0)
+ return client;
for (i = 0; i < 4; i++)
snd_trident_synth_create_port(trident, i);