aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ymfpci/ymfpci_main.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-10-10 05:56:31 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:18:00 -0500
commitb1d5776d865951c213a1caaab5d8bf5de7615dbd (patch)
treef999dca30f6e2d03a9176b86c613ae8f4531a6d6 /sound/pci/ymfpci/ymfpci_main.c
parent93f2e37840a9a7c3693ca6961fe6ad46b250f3b9 (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/pci/ymfpci/ymfpci_main.c')
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 2e671ee438c6..c0aaade772d4 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -2151,14 +2151,8 @@ static int snd_ymfpci_free(ymfpci_t *chip)
2151#ifdef CONFIG_PM 2151#ifdef CONFIG_PM
2152 vfree(chip->saved_regs); 2152 vfree(chip->saved_regs);
2153#endif 2153#endif
2154 if (chip->mpu_res) { 2154 release_and_free_resource(chip->mpu_res);
2155 release_resource(chip->mpu_res); 2155 release_and_free_resource(chip->fm_res);
2156 kfree_nocheck(chip->mpu_res);
2157 }
2158 if (chip->fm_res) {
2159 release_resource(chip->fm_res);
2160 kfree_nocheck(chip->fm_res);
2161 }
2162 snd_ymfpci_free_gameport(chip); 2156 snd_ymfpci_free_gameport(chip);
2163 if (chip->reg_area_virt) 2157 if (chip->reg_area_virt)
2164 iounmap(chip->reg_area_virt); 2158 iounmap(chip->reg_area_virt);
@@ -2167,10 +2161,7 @@ static int snd_ymfpci_free(ymfpci_t *chip)
2167 2161
2168 if (chip->irq >= 0) 2162 if (chip->irq >= 0)
2169 free_irq(chip->irq, (void *)chip); 2163 free_irq(chip->irq, (void *)chip);
2170 if (chip->res_reg_area) { 2164 release_and_free_resource(chip->res_reg_area);
2171 release_resource(chip->res_reg_area);
2172 kfree_nocheck(chip->res_reg_area);
2173 }
2174 2165
2175 pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl); 2166 pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl);
2176 2167