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/pci | |
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/pci')
-rw-r--r-- | sound/pci/trident/trident_synth.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c index e31055a4bd25..cc7af8bc55a0 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) | |||
934 | { | 934 | { |
935 | struct snd_trident *trident; | 935 | struct snd_trident *trident; |
936 | int client, i; | 936 | int client, i; |
937 | struct snd_seq_client_info cinfo; | ||
938 | struct snd_seq_port_subscribe sub; | 937 | struct snd_seq_port_subscribe sub; |
939 | struct snd_simple_ops *simpleops; | 938 | struct snd_simple_ops *simpleops; |
940 | char *str; | 939 | char *str; |
@@ -946,23 +945,16 @@ static int snd_trident_synth_new_device(struct snd_seq_device *dev) | |||
946 | trident->synth.seq_client = -1; | 945 | trident->synth.seq_client = -1; |
947 | 946 | ||
948 | /* allocate new client */ | 947 | /* allocate new client */ |
949 | client = trident->synth.seq_client = | ||
950 | snd_seq_create_kernel_client(trident->card, 1); | ||
951 | if (client < 0) | ||
952 | return client; | ||
953 | |||
954 | /* change name of client */ | ||
955 | memset(&cinfo, 0, sizeof(cinfo)); | ||
956 | cinfo.client = client; | ||
957 | cinfo.type = KERNEL_CLIENT; | ||
958 | str = "???"; | 948 | str = "???"; |
959 | switch (trident->device) { | 949 | switch (trident->device) { |
960 | case TRIDENT_DEVICE_ID_DX: str = "Trident 4DWave-DX"; break; | 950 | case TRIDENT_DEVICE_ID_DX: str = "Trident 4DWave-DX"; break; |
961 | case TRIDENT_DEVICE_ID_NX: str = "Trident 4DWave-NX"; break; | 951 | case TRIDENT_DEVICE_ID_NX: str = "Trident 4DWave-NX"; break; |
962 | case TRIDENT_DEVICE_ID_SI7018: str = "SiS 7018"; break; | 952 | case TRIDENT_DEVICE_ID_SI7018: str = "SiS 7018"; break; |
963 | } | 953 | } |
964 | sprintf(cinfo.name, str); | 954 | client = trident->synth.seq_client = |
965 | snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo); | 955 | snd_seq_create_kernel_client(trident->card, 1, str); |
956 | if (client < 0) | ||
957 | return client; | ||
966 | 958 | ||
967 | for (i = 0; i < 4; i++) | 959 | for (i = 0; i < 4; i++) |
968 | snd_trident_synth_create_port(trident, i); | 960 | snd_trident_synth_create_port(trident, i); |