diff options
author | Jody McIntyre <scjody@modernduck.com> | 2005-11-18 00:18:25 -0500 |
---|---|---|
committer | Jody McIntyre <scjody@modernduck.com> | 2005-11-18 00:18:25 -0500 |
commit | a9931a6e37c09f6b76a9fa0cbd777c335548692b (patch) | |
tree | cd6ba9d36e350dd6188f7b8f95efc59c85d34485 /sound/core/misc.c | |
parent | 7301c8d3a05dc52d33598364da7c4eb6ab6357eb (diff) | |
parent | 811803c5572b296e0031e0099203de90d77c7bcf (diff) |
Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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 |