git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
sound
/
synth
/
util_mem.c
diff --git
a/sound/synth/util_mem.c
b/sound/synth/util_mem.c
index
1d9b11f
..
217e8e5
100644
(file)
--- a/
sound/synth/util_mem.c
+++ b/
sound/synth/util_mem.c
@@
-18,7
+18,6
@@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <linux/mutex.h>
#include <sound/driver.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <sound/driver.h>
#include <linux/init.h>
#include <linux/slab.h>
@@
-43,7
+42,7
@@
snd_util_memhdr_new(int memsize)
if (hdr == NULL)
return NULL;
hdr->size = memsize;
if (hdr == NULL)
return NULL;
hdr->size = memsize;
-
mutex_init
(&hdr->block_mutex);
+
init_MUTEX
(&hdr->block_mutex);
INIT_LIST_HEAD(&hdr->block);
return hdr;
INIT_LIST_HEAD(&hdr->block);
return hdr;
@@
-137,9
+136,9
@@
struct snd_util_memblk *
snd_util_mem_alloc(struct snd_util_memhdr *hdr, int size)
{
struct snd_util_memblk *blk;
snd_util_mem_alloc(struct snd_util_memhdr *hdr, int size)
{
struct snd_util_memblk *blk;
-
mutex_lock
(&hdr->block_mutex);
+
down
(&hdr->block_mutex);
blk = __snd_util_mem_alloc(hdr, size);
blk = __snd_util_mem_alloc(hdr, size);
-
mutex_unlock
(&hdr->block_mutex);
+
up
(&hdr->block_mutex);
return blk;
}
return blk;
}
@@
-164,9
+163,9
@@
int snd_util_mem_free(struct snd_util_memhdr *hdr, struct snd_util_memblk *blk)
{
snd_assert(hdr && blk, return -EINVAL);
{
snd_assert(hdr && blk, return -EINVAL);
-
mutex_lock
(&hdr->block_mutex);
+
down
(&hdr->block_mutex);
__snd_util_mem_free(hdr, blk);
__snd_util_mem_free(hdr, blk);
-
mutex_unlock
(&hdr->block_mutex);
+
up
(&hdr->block_mutex);
return 0;
}
return 0;
}
@@
-176,9
+175,9
@@
int snd_util_mem_free(struct snd_util_memhdr *hdr, struct snd_util_memblk *blk)
int snd_util_mem_avail(struct snd_util_memhdr *hdr)
{
unsigned int size;
int snd_util_mem_avail(struct snd_util_memhdr *hdr)
{
unsigned int size;
-
mutex_lock
(&hdr->block_mutex);
+
down
(&hdr->block_mutex);
size = hdr->size - hdr->used;
size = hdr->size - hdr->used;
-
mutex_unlock
(&hdr->block_mutex);
+
up
(&hdr->block_mutex);
return size;
}
return size;
}