aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/gus
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/isa/gus
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/isa/gus')
-rw-r--r--sound/isa/gus/gus_mem.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c
index 609838e8ef6..5eb766dd564 100644
--- a/sound/isa/gus/gus_mem.c
+++ b/sound/isa/gus/gus_mem.c
@@ -21,6 +21,7 @@
21 21
22#include <sound/driver.h> 22#include <sound/driver.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/string.h>
24#include <sound/core.h> 25#include <sound/core.h>
25#include <sound/gus.h> 26#include <sound/gus.h>
26#include <sound/info.h> 27#include <sound/info.h>
@@ -213,7 +214,7 @@ snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
213 if (share_id != NULL) 214 if (share_id != NULL)
214 memcpy(&block.share_id, share_id, sizeof(block.share_id)); 215 memcpy(&block.share_id, share_id, sizeof(block.share_id));
215 block.owner = owner; 216 block.owner = owner;
216 block.name = snd_kmalloc_strdup(name, GFP_KERNEL); 217 block.name = kstrdup(name, GFP_KERNEL);
217 nblock = snd_gf1_mem_xalloc(alloc, &block); 218 nblock = snd_gf1_mem_xalloc(alloc, &block);
218 snd_gf1_mem_lock(alloc, 1); 219 snd_gf1_mem_lock(alloc, 1);
219 return nblock; 220 return nblock;
@@ -253,13 +254,13 @@ int snd_gf1_mem_init(snd_gus_card_t * gus)
253 if (gus->gf1.enh_mode) { 254 if (gus->gf1.enh_mode) {
254 block.ptr = 0; 255 block.ptr = 0;
255 block.size = 1024; 256 block.size = 1024;
256 block.name = snd_kmalloc_strdup("InterWave LFOs", GFP_KERNEL); 257 block.name = kstrdup("InterWave LFOs", GFP_KERNEL);
257 if (snd_gf1_mem_xalloc(alloc, &block) == NULL) 258 if (snd_gf1_mem_xalloc(alloc, &block) == NULL)
258 return -ENOMEM; 259 return -ENOMEM;
259 } 260 }
260 block.ptr = gus->gf1.default_voice_address; 261 block.ptr = gus->gf1.default_voice_address;
261 block.size = 4; 262 block.size = 4;
262 block.name = snd_kmalloc_strdup("Voice default (NULL's)", GFP_KERNEL); 263 block.name = kstrdup("Voice default (NULL's)", GFP_KERNEL);
263 if (snd_gf1_mem_xalloc(alloc, &block) == NULL) 264 if (snd_gf1_mem_xalloc(alloc, &block) == NULL)
264 return -ENOMEM; 265 return -ENOMEM;
265#ifdef CONFIG_SND_DEBUG 266#ifdef CONFIG_SND_DEBUG