diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-10-10 11:56:31 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 13:18:00 +0100 |
commit | b1d5776d865951c213a1caaab5d8bf5de7615dbd (patch) | |
tree | f999dca30f6e2d03a9176b86c613ae8f4531a6d6 /sound/isa/gus | |
parent | 93f2e37840a9a7c3693ca6961fe6ad46b250f3b9 (diff) | |
download | talos-obmc-linux-b1d5776d865951c213a1caaab5d8bf5de7615dbd.tar.gz talos-obmc-linux-b1d5776d865951c213a1caaab5d8bf5de7615dbd.zip |
[ALSA] Remove vmalloc wrapper, kfree_nocheck()
- Remove vmalloc wrapper
- Add release_and_free_resource() to remove kfree_nocheck() from each driver
and simplify the code
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/gus')
-rw-r--r-- | sound/isa/gus/gus_main.c | 10 | ||||
-rw-r--r-- | sound/isa/gus/interwave.c | 5 |
2 files changed, 3 insertions, 12 deletions
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 8f2872f8e8f6..5fd374f052ec 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c @@ -113,14 +113,8 @@ static int snd_gus_free(snd_gus_card_t *gus) snd_gf1_stop(gus); snd_gus_init_dma_irq(gus, 0); __hw_end: - if (gus->gf1.res_port1) { - release_resource(gus->gf1.res_port1); - kfree_nocheck(gus->gf1.res_port1); - } - if (gus->gf1.res_port2) { - release_resource(gus->gf1.res_port2); - kfree_nocheck(gus->gf1.res_port2); - } + release_and_free_resource(gus->gf1.res_port1); + release_and_free_resource(gus->gf1.res_port2); if (gus->gf1.irq >= 0) free_irq(gus->gf1.irq, (void *) gus); if (gus->gf1.dma1 >= 0) { diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 358cba9d738f..b101ab0a0dbf 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c @@ -638,10 +638,7 @@ static void snd_interwave_free(snd_card_t *card) if (iwcard == NULL) return; #ifdef SNDRV_STB - if (iwcard->i2c_res) { - release_resource(iwcard->i2c_res); - kfree_nocheck(iwcard->i2c_res); - } + release_and_free_resource(iwcard->i2c_res); #endif if (iwcard->irq >= 0) free_irq(iwcard->irq, (void *)iwcard); |