diff options
Diffstat (limited to 'sound/isa/gus/gus_mem.c')
-rw-r--r-- | sound/isa/gus/gus_mem.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index e8bdb860a19f..3c0d27aa08b3 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c | |||
@@ -34,9 +34,9 @@ static void snd_gf1_mem_info_read(struct snd_info_entry *entry, | |||
34 | void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup) | 34 | void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup) |
35 | { | 35 | { |
36 | if (!xup) { | 36 | if (!xup) { |
37 | down(&alloc->memory_mutex); | 37 | mutex_lock(&alloc->memory_mutex); |
38 | } else { | 38 | } else { |
39 | up(&alloc->memory_mutex); | 39 | mutex_unlock(&alloc->memory_mutex); |
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
@@ -59,7 +59,7 @@ static struct snd_gf1_mem_block *snd_gf1_mem_xalloc(struct snd_gf1_mem * alloc, | |||
59 | alloc->first = nblock; | 59 | alloc->first = nblock; |
60 | else | 60 | else |
61 | nblock->prev->next = nblock; | 61 | nblock->prev->next = nblock; |
62 | up(&alloc->memory_mutex); | 62 | mutex_unlock(&alloc->memory_mutex); |
63 | return NULL; | 63 | return NULL; |
64 | } | 64 | } |
65 | pblock = pblock->next; | 65 | pblock = pblock->next; |
@@ -80,7 +80,7 @@ int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * blo | |||
80 | { | 80 | { |
81 | if (block->share) { /* ok.. shared block */ | 81 | if (block->share) { /* ok.. shared block */ |
82 | block->share--; | 82 | block->share--; |
83 | up(&alloc->memory_mutex); | 83 | mutex_unlock(&alloc->memory_mutex); |
84 | return 0; | 84 | return 0; |
85 | } | 85 | } |
86 | if (alloc->first == block) { | 86 | if (alloc->first == block) { |
@@ -244,7 +244,7 @@ int snd_gf1_mem_init(struct snd_gus_card * gus) | |||
244 | #endif | 244 | #endif |
245 | 245 | ||
246 | alloc = &gus->gf1.mem_alloc; | 246 | alloc = &gus->gf1.mem_alloc; |
247 | init_MUTEX(&alloc->memory_mutex); | 247 | mutex_init(&alloc->memory_mutex); |
248 | alloc->first = alloc->last = NULL; | 248 | alloc->first = alloc->last = NULL; |
249 | if (!gus->gf1.memory) | 249 | if (!gus->gf1.memory) |
250 | return 0; | 250 | return 0; |
@@ -299,7 +299,7 @@ static void snd_gf1_mem_info_read(struct snd_info_entry *entry, | |||
299 | 299 | ||
300 | gus = entry->private_data; | 300 | gus = entry->private_data; |
301 | alloc = &gus->gf1.mem_alloc; | 301 | alloc = &gus->gf1.mem_alloc; |
302 | down(&alloc->memory_mutex); | 302 | mutex_lock(&alloc->memory_mutex); |
303 | snd_iprintf(buffer, "8-bit banks : \n "); | 303 | snd_iprintf(buffer, "8-bit banks : \n "); |
304 | for (i = 0; i < 4; i++) | 304 | for (i = 0; i < 4; i++) |
305 | snd_iprintf(buffer, "0x%06x (%04ik)%s", alloc->banks_8[i].address, alloc->banks_8[i].size >> 10, i + 1 < 4 ? "," : ""); | 305 | snd_iprintf(buffer, "0x%06x (%04ik)%s", alloc->banks_8[i].address, alloc->banks_8[i].size >> 10, i + 1 < 4 ? "," : ""); |
@@ -343,7 +343,7 @@ static void snd_gf1_mem_info_read(struct snd_info_entry *entry, | |||
343 | } | 343 | } |
344 | snd_iprintf(buffer, " Total: memory = %i, used = %i, free = %i\n", | 344 | snd_iprintf(buffer, " Total: memory = %i, used = %i, free = %i\n", |
345 | total, used, total - used); | 345 | total, used, total - used); |
346 | up(&alloc->memory_mutex); | 346 | mutex_unlock(&alloc->memory_mutex); |
347 | #if 0 | 347 | #if 0 |
348 | ultra_iprintf(buffer, " Verify: free = %i, max 8-bit block = %i, max 16-bit block = %i\n", | 348 | ultra_iprintf(buffer, " Verify: free = %i, max 8-bit block = %i, max 16-bit block = %i\n", |
349 | ultra_memory_free_size(card, &card->gf1.mem_alloc), | 349 | ultra_memory_free_size(card, &card->gf1.mem_alloc), |