aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 '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);
293void *snd_hidden_kzalloc(size_t size, gfp_t flags); 293void *snd_hidden_kzalloc(size_t size, gfp_t flags);
294void *snd_hidden_kcalloc(size_t n, size_t size, gfp_t flags); 294void *snd_hidden_kcalloc(size_t n, size_t size, gfp_t flags);
295void snd_hidden_kfree(const void *obj); 295void snd_hidden_kfree(const void *obj);
296void *snd_hidden_vmalloc(unsigned long size);
297void snd_hidden_vfree(void *obj);
298char *snd_hidden_kstrdup(const char *s, gfp_t flags); 296char *snd_hidden_kstrdup(const char *s, gfp_t flags);
299#define kmalloc(size, flags) snd_hidden_kmalloc(size, flags) 297#define kmalloc(size, flags) snd_hidden_kmalloc(size, flags)
300#define kzalloc(size, flags) snd_hidden_kzalloc(size, flags) 298#define kzalloc(size, flags) snd_hidden_kzalloc(size, flags)
301#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags) 299#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags)
302#define kfree(obj) snd_hidden_kfree(obj) 300#define kfree(obj) snd_hidden_kfree(obj)
303#define vmalloc(size) snd_hidden_vmalloc(size)
304#define vfree(obj) snd_hidden_vfree(obj)
305#define kmalloc_nocheck(size, flags) snd_wrapper_kmalloc(size, flags) 301#define kmalloc_nocheck(size, flags) snd_wrapper_kmalloc(size, flags)
306#define vmalloc_nocheck(size) snd_wrapper_vmalloc(size)
307#define kfree_nocheck(obj) snd_wrapper_kfree(obj) 302#define kfree_nocheck(obj) snd_wrapper_kfree(obj)
308#define vfree_nocheck(obj) snd_wrapper_vfree(obj)
309#define kstrdup(s, flags) snd_hidden_kstrdup(s, flags) 303#define kstrdup(s, flags) snd_hidden_kstrdup(s, flags)
310#else 304#else
311#define snd_memory_init() /*NOP*/ 305#define snd_memory_init() /*NOP*/
@@ -313,9 +307,7 @@ char *snd_hidden_kstrdup(const char *s, gfp_t flags);
313#define snd_memory_info_init() /*NOP*/ 307#define snd_memory_info_init() /*NOP*/
314#define snd_memory_info_done() /*NOP*/ 308#define snd_memory_info_done() /*NOP*/
315#define kmalloc_nocheck(size, flags) kmalloc(size, flags) 309#define kmalloc_nocheck(size, flags) kmalloc(size, flags)
316#define vmalloc_nocheck(size) vmalloc(size)
317#define kfree_nocheck(obj) kfree(obj) 310#define kfree_nocheck(obj) kfree(obj)
318#define vfree_nocheck(obj) vfree(obj)
319#endif 311#endif
320int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count); 312int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count);
321int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count); 313int 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);
372#endif 364#endif
373 365
374/* misc.c */ 366/* misc.c */
367void release_and_free_resource(struct resource *res);
375 368
376#ifdef CONFIG_SND_VERBOSE_PRINTK 369#ifdef CONFIG_SND_VERBOSE_PRINTK
377void snd_verbose_printk(const char *file, int line, const char *format, ...) 370void 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);
55#undef kmalloc 55#undef kmalloc
56void snd_wrapper_kfree(const void *); 56void snd_wrapper_kfree(const void *);
57#undef kfree 57#undef kfree
58void *snd_wrapper_vmalloc(size_t);
59#undef vmalloc
60void snd_wrapper_vfree(void *);
61#undef vfree
62#endif 58#endif
63 59
64#endif /* __SOUND_DRIVER_H */ 60#endif /* __SOUND_DRIVER_H */