[ALSA] seq: set client name in snd_seq_create_kernel_client()
[linux-2.6.git] / sound / drivers / opl3 / opl3_seq.c
index 1886b29..c4ead79 100644 (file)
@@ -219,8 +219,7 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
 {
        struct snd_opl3 *opl3;
        int client;
-       struct snd_seq_client_callback callbacks;
-       struct snd_seq_client_info cinfo;
+       char name[32];
        int opl_ver;
 
        opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
@@ -232,22 +231,14 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
        opl3->seq_client = -1;
 
        /* allocate new client */
-       memset(&callbacks, 0, sizeof(callbacks));
-       callbacks.private_data = opl3;
-       callbacks.allow_output = callbacks.allow_input = 1;
+       opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
+       sprintf(name, "OPL%i FM synth", opl_ver);
        client = opl3->seq_client =
-           snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num, &callbacks);
+               snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num,
+                                            name);
        if (client < 0)
                return client;
 
-       /* change name of client */
-       memset(&cinfo, 0, sizeof(cinfo));
-       cinfo.client = client;
-       cinfo.type = KERNEL_CLIENT;
-       opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
-       sprintf(cinfo.name, "OPL%i FM synth", opl_ver);
-       snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
-
        snd_opl3_synth_create_port(opl3);
 
        /* initialize instrument list */
@@ -268,7 +259,7 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
        opl3->sys_timer_status = 0;
 
 #ifdef CONFIG_SND_SEQUENCER_OSS
-       snd_opl3_init_seq_oss(opl3, cinfo.name);
+       snd_opl3_init_seq_oss(opl3, name);
 #endif
        return 0;
 }