diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-10-10 05:56:31 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:18:00 -0500 |
commit | b1d5776d865951c213a1caaab5d8bf5de7615dbd (patch) | |
tree | f999dca30f6e2d03a9176b86c613ae8f4531a6d6 /sound/isa/sb | |
parent | 93f2e37840a9a7c3693ca6961fe6ad46b250f3b9 (diff) |
[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/sb')
-rw-r--r-- | sound/isa/sb/emu8000.c | 15 | ||||
-rw-r--r-- | sound/isa/sb/sb16.c | 5 | ||||
-rw-r--r-- | sound/isa/sb/sb8.c | 5 | ||||
-rw-r--r-- | sound/isa/sb/sb_common.c | 6 |
4 files changed, 7 insertions, 24 deletions
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c index 5375705c054b..95540f133199 100644 --- a/sound/isa/sb/emu8000.c +++ b/sound/isa/sb/emu8000.c | |||
@@ -1054,18 +1054,9 @@ __error: | |||
1054 | */ | 1054 | */ |
1055 | static int snd_emu8000_free(emu8000_t *hw) | 1055 | static int snd_emu8000_free(emu8000_t *hw) |
1056 | { | 1056 | { |
1057 | if (hw->res_port1) { | 1057 | release_and_free_resource(hw->res_port1); |
1058 | release_resource(hw->res_port1); | 1058 | release_and_free_resource(hw->res_port2); |
1059 | kfree_nocheck(hw->res_port1); | 1059 | release_and_free_resource(hw->res_port3); |
1060 | } | ||
1061 | if (hw->res_port2) { | ||
1062 | release_resource(hw->res_port2); | ||
1063 | kfree_nocheck(hw->res_port2); | ||
1064 | } | ||
1065 | if (hw->res_port3) { | ||
1066 | release_resource(hw->res_port3); | ||
1067 | kfree_nocheck(hw->res_port3); | ||
1068 | } | ||
1069 | kfree(hw); | 1060 | kfree(hw); |
1070 | return 0; | 1061 | return 0; |
1071 | } | 1062 | } |
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c index 7888783d68f5..c2fa451bc8f0 100644 --- a/sound/isa/sb/sb16.c +++ b/sound/isa/sb/sb16.c | |||
@@ -345,10 +345,7 @@ static void snd_sb16_free(snd_card_t *card) | |||
345 | 345 | ||
346 | if (acard == NULL) | 346 | if (acard == NULL) |
347 | return; | 347 | return; |
348 | if (acard->fm_res) { | 348 | release_and_free_resource(acard->fm_res); |
349 | release_resource(acard->fm_res); | ||
350 | kfree_nocheck(acard->fm_res); | ||
351 | } | ||
352 | } | 349 | } |
353 | 350 | ||
354 | #ifdef CONFIG_PNP | 351 | #ifdef CONFIG_PNP |
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c index c41ac25e85ca..0bc0a3afdabc 100644 --- a/sound/isa/sb/sb8.c +++ b/sound/isa/sb/sb8.c | |||
@@ -78,10 +78,7 @@ static void snd_sb8_free(snd_card_t *card) | |||
78 | 78 | ||
79 | if (acard == NULL) | 79 | if (acard == NULL) |
80 | return; | 80 | return; |
81 | if (acard->fm_res) { | 81 | release_and_free_resource(acard->fm_res); |
82 | release_resource(acard->fm_res); | ||
83 | kfree_nocheck(acard->fm_res); | ||
84 | } | ||
85 | } | 82 | } |
86 | 83 | ||
87 | static int __init snd_sb8_probe(int dev) | 84 | static int __init snd_sb8_probe(int dev) |
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c index f0f205ae425f..46b9480669f9 100644 --- a/sound/isa/sb/sb_common.c +++ b/sound/isa/sb/sb_common.c | |||
@@ -178,10 +178,8 @@ static int snd_sbdsp_probe(sb_t * chip) | |||
178 | 178 | ||
179 | static int snd_sbdsp_free(sb_t *chip) | 179 | static int snd_sbdsp_free(sb_t *chip) |
180 | { | 180 | { |
181 | if (chip->res_port) { | 181 | if (chip->res_port) |
182 | release_resource(chip->res_port); | 182 | release_and_free_resource(chip->res_port); |
183 | kfree_nocheck(chip->res_port); | ||
184 | } | ||
185 | if (chip->irq >= 0) | 183 | if (chip->irq >= 0) |
186 | free_irq(chip->irq, (void *) chip); | 184 | free_irq(chip->irq, (void *) chip); |
187 | #ifdef CONFIG_ISA | 185 | #ifdef CONFIG_ISA |