Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv24649/core

Modified Files:
        pcm.c 
Log Message:
removed the export of snd_pcm_lock().  replaced with the normal mutex.



Index: pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/pcm.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- pcm.c       17 Oct 2003 15:38:59 -0000      1.32
+++ pcm.c       20 Oct 2003 15:28:38 -0000      1.33
@@ -43,15 +43,6 @@
 static int snd_pcm_dev_disconnect(snd_device_t *device);
 static int snd_pcm_dev_unregister(snd_device_t *device);
 
-void snd_pcm_lock(int xup)
-{
-       if (!xup) {
-               down(&register_mutex);
-       } else {
-               up(&register_mutex);
-       }
-}
-
 static int snd_pcm_control_ioctl(snd_card_t * card,
                                 snd_ctl_file_t * control,
                                 unsigned int cmd, unsigned long arg)
@@ -836,10 +827,10 @@
        snd_pcm_t *pcm = snd_magic_cast(snd_pcm_t, device->device_data, return -ENXIO);
 
        snd_assert(pcm != NULL && device != NULL, return -ENXIO);
-       snd_pcm_lock(0);
+       down(&register_mutex);
        idx = (pcm->card->number * SNDRV_PCM_DEVICES) + pcm->device;
        if (snd_pcm_devices[idx]) {
-               snd_pcm_lock(1);
+               up(&register_mutex);
                return -EBUSY;
        }
        snd_pcm_devices[idx] = pcm;
@@ -861,7 +852,7 @@
                }
                if ((err = snd_register_device(devtype, pcm->card, pcm->device, 
pcm->streams[cidx].reg, str)) < 0) {
                        snd_pcm_devices[idx] = NULL;
-                       snd_pcm_lock(1);
+                       up(&register_mutex);
                        return err;
                }
                for (substream = pcm->streams[cidx].substream; substream; substream = 
substream->next)
@@ -872,7 +863,7 @@
                notify = list_entry(list, snd_pcm_notify_t, list);
                notify->n_register(pcm);
        }
-       snd_pcm_lock(1);
+       up(&register_mutex);
        return 0;
 }
 
@@ -882,7 +873,7 @@
        struct list_head *list;
        int idx;
 
-       snd_pcm_lock(0);
+       down(&register_mutex);
        idx = (pcm->card->number * SNDRV_PCM_DEVICES) + pcm->device;
        snd_pcm_devices[idx] = NULL;
        list_for_each(list, &snd_pcm_notify_list) {
@@ -890,7 +881,7 @@
                notify = list_entry(list, snd_pcm_notify_t, list);
                notify->n_disconnect(pcm);
        }
-       snd_pcm_lock(1);
+       up(&register_mutex);
        return 0;
 }
 
@@ -902,7 +893,7 @@
        snd_pcm_t *pcm = snd_magic_cast(snd_pcm_t, device->device_data, return -ENXIO);
 
        snd_assert(pcm != NULL, return -ENXIO);
-       snd_pcm_lock(0);
+       down(&register_mutex);
        idx = (pcm->card->number * SNDRV_PCM_DEVICES) + pcm->device;
        snd_pcm_devices[idx] = NULL;
        for (cidx = 0; cidx < 2; cidx++) {
@@ -924,7 +915,7 @@
                notify = list_entry(list, snd_pcm_notify_t, list);
                notify->n_unregister(pcm);
        }
-       snd_pcm_lock(1);
+       up(&register_mutex);
        return snd_pcm_free(pcm);
 }
 
@@ -933,7 +924,7 @@
        int idx;
 
        snd_assert(notify != NULL && notify->n_register != NULL && 
notify->n_unregister != NULL, return -EINVAL);
-       snd_pcm_lock(0);
+       down(&register_mutex);
        if (nfree) {
                list_del(&notify->list);
                for (idx = 0; idx < SNDRV_CARDS * SNDRV_PCM_DEVICES; idx++) {
@@ -949,7 +940,7 @@
                        notify->n_register(snd_pcm_devices[idx]);
                }
        }
-       snd_pcm_lock(1);
+       up(&register_mutex);
        return 0;
 }
 
@@ -1014,7 +1005,6 @@
 module_init(alsa_pcm_init)
 module_exit(alsa_pcm_exit)
 
-EXPORT_SYMBOL(snd_pcm_lock);
 EXPORT_SYMBOL(snd_pcm_devices);
 EXPORT_SYMBOL(snd_pcm_new);
 EXPORT_SYMBOL(snd_pcm_new_stream);



-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to