summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-10-10 11:56:31 +0200
committerJaroslav Kysela <perex@suse.cz>2005-11-04 13:18:00 +0100
commitb1d5776d865951c213a1caaab5d8bf5de7615dbd (patch)
treef999dca30f6e2d03a9176b86c613ae8f4531a6d6 /include
parent[ALSA] Make snd_task_name() module local (diff)
downloadlinux-b1d5776d865951c213a1caaab5d8bf5de7615dbd.tar.xz
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 'include')
-rw-r--r--include/sound/core.h9
-rw-r--r--include/sound/driver.h4
2 files changed, 1 insertions, 12 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index af314205635d..0a14885fb1d7 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -293,19 +293,13 @@ void *snd_hidden_kmalloc(size_t size, gfp_t flags);
void *snd_hidden_kzalloc(size_t size, gfp_t flags);
void *snd_hidden_kcalloc(size_t n, size_t size, gfp_t flags);
void snd_hidden_kfree(const void *obj);
-void *snd_hidden_vmalloc(unsigned long size);
-void snd_hidden_vfree(void *obj);
char *snd_hidden_kstrdup(const char *s, gfp_t flags);
#define kmalloc(size, flags) snd_hidden_kmalloc(size, flags)
#define kzalloc(size, flags) snd_hidden_kzalloc(size, flags)
#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags)
#define kfree(obj) snd_hidden_kfree(obj)
-#define vmalloc(size) snd_hidden_vmalloc(size)
-#define vfree(obj) snd_hidden_vfree(obj)
#define kmalloc_nocheck(size, flags) snd_wrapper_kmalloc(size, flags)
-#define vmalloc_nocheck(size) snd_wrapper_vmalloc(size)
#define kfree_nocheck(obj) snd_wrapper_kfree(obj)
-#define vfree_nocheck(obj) snd_wrapper_vfree(obj)
#define kstrdup(s, flags) snd_hidden_kstrdup(s, flags)
#else
#define snd_memory_init() /*NOP*/
@@ -313,9 +307,7 @@ char *snd_hidden_kstrdup(const char *s, gfp_t flags);
#define snd_memory_info_init() /*NOP*/
#define snd_memory_info_done() /*NOP*/
#define kmalloc_nocheck(size, flags) kmalloc(size, flags)
-#define vmalloc_nocheck(size) vmalloc(size)
#define kfree_nocheck(obj) kfree(obj)
-#define vfree_nocheck(obj) vfree(obj)
#endif
int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count);
int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count);
@@ -372,6 +364,7 @@ unsigned int snd_dma_pointer(unsigned long dma, unsigned int size);
#endif
/* misc.c */
+void release_and_free_resource(struct resource *res);
#ifdef CONFIG_SND_VERBOSE_PRINTK
void snd_verbose_printk(const char *file, int line, const char *format, ...)
diff --git a/include/sound/driver.h b/include/sound/driver.h
index 1ec2fae050a6..7973e0c05ae3 100644
--- a/include/sound/driver.h
+++ b/include/sound/driver.h
@@ -55,10 +55,6 @@ void *snd_wrapper_kmalloc(size_t, gfp_t);
#undef kmalloc
void snd_wrapper_kfree(const void *);
#undef kfree
-void *snd_wrapper_vmalloc(size_t);
-#undef vmalloc
-void snd_wrapper_vfree(void *);
-#undef vfree
#endif
#endif /* __SOUND_DRIVER_H */