diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 08:09:02 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 08:09:02 -0800 |
commit | 8f0cb147b2fb12427bf6abef7fed2b604557a41e (patch) | |
tree | fb5ba437ee74b900fab9686c8c7df18abcd7640b /sound/core/misc.c | |
parent | 8e33ba49765484bc6de3a2f8143733713fa93bc1 (diff) | |
parent | b00e8443c3eece823052d06ae1c7cb797ab0ddf5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
Diffstat (limited to 'sound/core/misc.c')
-rw-r--r-- | sound/core/misc.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/core/misc.c b/sound/core/misc.c index 1a81fe4df21..b53e563c09e 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -23,17 +23,15 @@ #include <linux/init.h> #include <linux/sched.h> #include <linux/time.h> +#include <linux/ioport.h> #include <sound/core.h> -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); + } } #ifdef CONFIG_SND_VERBOSE_PRINTK |