summaryrefslogtreecommitdiffstats
path: root/sound/core/misc.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-08 11:14:20 +1100
committerPaul Mackerras <paulus@samba.org>2005-11-08 11:14:20 +1100
commit24bfb00123e82a2e70bd115277d922438813515b (patch)
tree27328b8a5718e16d64e2d101f4b7ddcad5930aed /sound/core/misc.c
parentc6135234550ed89a6fd0e8cb229633967e41d649 (diff)
parent3f00d3e8fb963968a922d821a9a53b503b687e81 (diff)
Merge ../linux-2.6
Diffstat (limited to 'sound/core/misc.c')
-rw-r--r--sound/core/misc.c14
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