patch-2.4.0-test2 linux/drivers/sound/awe_wave.c
Next file: linux/drivers/sound/cmpci.c
Previous file: linux/drivers/sound/ac97_codec.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Mon Jun 19 13:42:41 2000
- Orig file:
v2.4.0-test1/linux/drivers/sound/awe_wave.c
- Orig date:
Mon Mar 27 08:08:28 2000
diff -u --recursive --new-file v2.4.0-test1/linux/drivers/sound/awe_wave.c linux/drivers/sound/awe_wave.c
@@ -3252,7 +3252,7 @@
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 @@
sf->num_info--;
removed++;
kfree(p);
- }
+ } else
+ prev = p;
}
+ if (removed)
+ rebuild_preset_list();
return removed;
}
@@ -3318,7 +3321,7 @@
}
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;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)