aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/gus/gus_mem.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:36:44 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:27 -0500
commit5e2da20648e39a0e3cb33861499b686a6fe38112 (patch)
treee5f3117e2f44b262f9b6d45cfbd9e17a0ea913bd /sound/isa/gus/gus_mem.c
parent029d64b0cfa30abc10f722e2f67d282abe09c9da (diff)
[ALSA] Remove xxx_t typedefs: ISA GUS
Remove xxx_t typedefs from the ISA GUS drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/gus/gus_mem.c')
-rw-r--r--sound/isa/gus/gus_mem.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c
index 2e23f2a8c627..e8bdb860a19f 100644
--- a/sound/isa/gus/gus_mem.c
+++ b/sound/isa/gus/gus_mem.c
@@ -27,11 +27,11 @@
27#include <sound/info.h> 27#include <sound/info.h>
28 28
29#ifdef CONFIG_SND_DEBUG 29#ifdef CONFIG_SND_DEBUG
30static void snd_gf1_mem_info_read(snd_info_entry_t *entry, 30static void snd_gf1_mem_info_read(struct snd_info_entry *entry,
31 snd_info_buffer_t * buffer); 31 struct snd_info_buffer *buffer);
32#endif 32#endif
33 33
34void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup) 34void 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 down(&alloc->memory_mutex);
@@ -40,12 +40,12 @@ void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup)
40 } 40 }
41} 41}
42 42
43static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc, 43static struct snd_gf1_mem_block *snd_gf1_mem_xalloc(struct snd_gf1_mem * alloc,
44 snd_gf1_mem_block_t * block) 44 struct snd_gf1_mem_block * block)
45{ 45{
46 snd_gf1_mem_block_t *pblock, *nblock; 46 struct snd_gf1_mem_block *pblock, *nblock;
47 47
48 nblock = (snd_gf1_mem_block_t *) kmalloc(sizeof(snd_gf1_mem_block_t), GFP_KERNEL); 48 nblock = kmalloc(sizeof(struct snd_gf1_mem_block), GFP_KERNEL);
49 if (nblock == NULL) 49 if (nblock == NULL)
50 return NULL; 50 return NULL;
51 *nblock = *block; 51 *nblock = *block;
@@ -76,7 +76,7 @@ static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc,
76 return nblock; 76 return nblock;
77} 77}
78 78
79int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block) 79int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block)
80{ 80{
81 if (block->share) { /* ok.. shared block */ 81 if (block->share) { /* ok.. shared block */
82 block->share--; 82 block->share--;
@@ -106,10 +106,10 @@ int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block)
106 return 0; 106 return 0;
107} 107}
108 108
109static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc, 109static struct snd_gf1_mem_block *snd_gf1_mem_look(struct snd_gf1_mem * alloc,
110 unsigned int address) 110 unsigned int address)
111{ 111{
112 snd_gf1_mem_block_t *block; 112 struct snd_gf1_mem_block *block;
113 113
114 for (block = alloc->first; block; block = block->next) { 114 for (block = alloc->first; block; block = block->next) {
115 if (block->ptr == address) { 115 if (block->ptr == address) {
@@ -119,10 +119,10 @@ static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc,
119 return NULL; 119 return NULL;
120} 120}
121 121
122static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc, 122static struct snd_gf1_mem_block *snd_gf1_mem_share(struct snd_gf1_mem * alloc,
123 unsigned int *share_id) 123 unsigned int *share_id)
124{ 124{
125 snd_gf1_mem_block_t *block; 125 struct snd_gf1_mem_block *block;
126 126
127 if (!share_id[0] && !share_id[1] && 127 if (!share_id[0] && !share_id[1] &&
128 !share_id[2] && !share_id[3]) 128 !share_id[2] && !share_id[3])
@@ -133,14 +133,14 @@ static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc,
133 return NULL; 133 return NULL;
134} 134}
135 135
136static int snd_gf1_mem_find(snd_gf1_mem_t * alloc, 136static int snd_gf1_mem_find(struct snd_gf1_mem * alloc,
137 snd_gf1_mem_block_t * block, 137 struct snd_gf1_mem_block * block,
138 unsigned int size, int w_16, int align) 138 unsigned int size, int w_16, int align)
139{ 139{
140 snd_gf1_bank_info_t *info = w_16 ? alloc->banks_16 : alloc->banks_8; 140 struct snd_gf1_bank_info *info = w_16 ? alloc->banks_16 : alloc->banks_8;
141 unsigned int idx, boundary; 141 unsigned int idx, boundary;
142 int size1; 142 int size1;
143 snd_gf1_mem_block_t *pblock; 143 struct snd_gf1_mem_block *pblock;
144 unsigned int ptr1, ptr2; 144 unsigned int ptr1, ptr2;
145 145
146 align--; 146 align--;
@@ -186,11 +186,11 @@ static int snd_gf1_mem_find(snd_gf1_mem_t * alloc,
186 return -ENOMEM; 186 return -ENOMEM;
187} 187}
188 188
189snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner, 189struct snd_gf1_mem_block *snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner,
190 char *name, int size, int w_16, int align, 190 char *name, int size, int w_16, int align,
191 unsigned int *share_id) 191 unsigned int *share_id)
192{ 192{
193 snd_gf1_mem_block_t block, *nblock; 193 struct snd_gf1_mem_block block, *nblock;
194 194
195 snd_gf1_mem_lock(alloc, 0); 195 snd_gf1_mem_lock(alloc, 0);
196 if (share_id != NULL) { 196 if (share_id != NULL) {
@@ -220,10 +220,10 @@ snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
220 return nblock; 220 return nblock;
221} 221}
222 222
223int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address) 223int snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address)
224{ 224{
225 int result; 225 int result;
226 snd_gf1_mem_block_t *block; 226 struct snd_gf1_mem_block *block;
227 227
228 snd_gf1_mem_lock(alloc, 0); 228 snd_gf1_mem_lock(alloc, 0);
229 if ((block = snd_gf1_mem_look(alloc, address)) != NULL) { 229 if ((block = snd_gf1_mem_look(alloc, address)) != NULL) {
@@ -235,12 +235,12 @@ int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address)
235 return -EINVAL; 235 return -EINVAL;
236} 236}
237 237
238int snd_gf1_mem_init(snd_gus_card_t * gus) 238int snd_gf1_mem_init(struct snd_gus_card * gus)
239{ 239{
240 snd_gf1_mem_t *alloc; 240 struct snd_gf1_mem *alloc;
241 snd_gf1_mem_block_t block; 241 struct snd_gf1_mem_block block;
242#ifdef CONFIG_SND_DEBUG 242#ifdef CONFIG_SND_DEBUG
243 snd_info_entry_t *entry; 243 struct snd_info_entry *entry;
244#endif 244#endif
245 245
246 alloc = &gus->gf1.mem_alloc; 246 alloc = &gus->gf1.mem_alloc;
@@ -272,10 +272,10 @@ int snd_gf1_mem_init(snd_gus_card_t * gus)
272 return 0; 272 return 0;
273} 273}
274 274
275int snd_gf1_mem_done(snd_gus_card_t * gus) 275int snd_gf1_mem_done(struct snd_gus_card * gus)
276{ 276{
277 snd_gf1_mem_t *alloc; 277 struct snd_gf1_mem *alloc;
278 snd_gf1_mem_block_t *block, *nblock; 278 struct snd_gf1_mem_block *block, *nblock;
279 279
280 alloc = &gus->gf1.mem_alloc; 280 alloc = &gus->gf1.mem_alloc;
281 block = alloc->first; 281 block = alloc->first;
@@ -288,12 +288,12 @@ int snd_gf1_mem_done(snd_gus_card_t * gus)
288} 288}
289 289
290#ifdef CONFIG_SND_DEBUG 290#ifdef CONFIG_SND_DEBUG
291static void snd_gf1_mem_info_read(snd_info_entry_t *entry, 291static void snd_gf1_mem_info_read(struct snd_info_entry *entry,
292 snd_info_buffer_t * buffer) 292 struct snd_info_buffer *buffer)
293{ 293{
294 snd_gus_card_t *gus; 294 struct snd_gus_card *gus;
295 snd_gf1_mem_t *alloc; 295 struct snd_gf1_mem *alloc;
296 snd_gf1_mem_block_t *block; 296 struct snd_gf1_mem_block *block;
297 unsigned int total, used; 297 unsigned int total, used;
298 int i; 298 int i;
299 299