summaryrefslogtreecommitdiffstats
path: root/drivers/sound/awe_wave.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
commit6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch)
tree0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /drivers/sound/awe_wave.c
parentecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff)
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine status unknown.
Diffstat (limited to 'drivers/sound/awe_wave.c')
-rw-r--r--drivers/sound/awe_wave.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/sound/awe_wave.c b/drivers/sound/awe_wave.c
index ac00add8f..4fee7b72f 100644
--- a/drivers/sound/awe_wave.c
+++ b/drivers/sound/awe_wave.c
@@ -3252,7 +3252,7 @@ remove_info(sf_list *sf, int bank, int instr)
int removed = 0;
prev = NULL;
- for (p = sf->infos; p; prev = p, p = next) {
+ for (p = sf->infos; p; p = next) {
next = p->next;
if (p->type == V_ST_NORMAL &&
p->bank == bank && p->instr == instr) {
@@ -3266,8 +3266,11 @@ remove_info(sf_list *sf, int bank, int instr)
sf->num_info--;
removed++;
kfree(p);
- }
+ } else
+ prev = p;
}
+ if (removed)
+ rebuild_preset_list();
return removed;
}
@@ -3318,7 +3321,7 @@ awe_load_info(awe_patch_info *patch, const char *addr, int count)
}
break;
case AWE_WR_REPLACE:
- /* replace mode - remoe the instrument if it already exists */
+ /* replace mode - remove the instrument if it already exists */
remove_info(sf, hdr.bank, hdr.instr);
break;
}