X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fcore%2Fmisc.c;h=03fc711f4127a5d361cc9b349ef7258c224136d9;hb=refs%2Fheads%2Fvserver;hp=1a81fe4df218b2a47c7428d7b5225bc6b1ad8446;hpb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;p=linux-2.6.git diff --git a/sound/core/misc.c b/sound/core/misc.c index 1a81fe4df..03fc711f4 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -23,19 +23,19 @@ #include #include #include +#include #include -int snd_task_name(struct task_struct *task, char *name, size_t size) +void release_and_free_resource(struct resource *res) { - unsigned int idx; - - snd_assert(task != NULL && name != NULL && size >= 2, return -EINVAL); - for (idx = 0; idx < sizeof(task->comm) && idx + 1 < size; idx++) - name[idx] = task->comm[idx]; - name[idx] = '\0'; - return 0; + if (res) { + release_resource(res); + kfree(res); + } } +EXPORT_SYMBOL(release_and_free_resource); + #ifdef CONFIG_SND_VERBOSE_PRINTK void snd_verbose_printk(const char *file, int line, const char *format, ...) { @@ -53,6 +53,8 @@ void snd_verbose_printk(const char *file, int line, const char *format, ...) vprintk(format, args); va_end(args); } + +EXPORT_SYMBOL(snd_verbose_printk); #endif #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) @@ -73,4 +75,6 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) va_end(args); } + +EXPORT_SYMBOL(snd_verbose_printd); #endif