aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/timer.c
diff options
context:
space:
mode:
authorPaulo Marques <pmarques@grupopie.com>2005-06-23 03:09:02 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:18 -0400
commit543537bd922692bc978e2e356fcd8bfc9c2ee7d5 (patch)
tree0089e3907e7d6c17c01cffc6ea4a8962ed053079 /sound/core/timer.c
parent991114c6fa6a21d1fa4d544abe78592352860c82 (diff)
[PATCH] create a kstrdup library function
This patch creates a new kstrdup library function and changes the "local" implementations in several places to use this function. Most of the changes come from the sound and net subsystems. The sound part had already been acknowledged by Takashi Iwai and the net part by David S. Miller. I left UML alone for now because I would need more time to read the code carefully before making changes there. Signed-off-by: Paulo Marques <pmarques@grupopie.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r--sound/core/timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index b498e5482d77..cfaccd415b3b 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -26,6 +26,7 @@
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/time.h> 27#include <linux/time.h>
28#include <linux/moduleparam.h> 28#include <linux/moduleparam.h>
29#include <linux/string.h>
29#include <sound/core.h> 30#include <sound/core.h>
30#include <sound/timer.h> 31#include <sound/timer.h>
31#include <sound/control.h> 32#include <sound/control.h>
@@ -100,7 +101,7 @@ static snd_timer_instance_t *snd_timer_instance_new(char *owner, snd_timer_t *ti
100 timeri = kcalloc(1, sizeof(*timeri), GFP_KERNEL); 101 timeri = kcalloc(1, sizeof(*timeri), GFP_KERNEL);
101 if (timeri == NULL) 102 if (timeri == NULL)
102 return NULL; 103 return NULL;
103 timeri->owner = snd_kmalloc_strdup(owner, GFP_KERNEL); 104 timeri->owner = kstrdup(owner, GFP_KERNEL);
104 if (! timeri->owner) { 105 if (! timeri->owner) {
105 kfree(timeri); 106 kfree(timeri);
106 return NULL; 107 return NULL;