aboutsummaryrefslogtreecommitdiff
path: root/sound/core/rawmidi.c
diff options
context:
space:
mode:
authorTakashi Iwai2005-09-09 14:20:23 +0200
committerJaroslav Kysela2005-09-12 10:47:59 +0200
commitca2c0966562cfbf9273167a5b60e8fddc24078d6 (patch)
tree0292047f4cd0a24e1b24914081ebe890bb535877 /sound/core/rawmidi.c
parent8648811f1db85eeacb821591ef11a2c229c29aa0 (diff)
[ALSA] Replace with kzalloc() - core stuff
Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel Timer Midlevel,ALSA<-OSS emulation Replace kcalloc(1,..) with kzalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/rawmidi.c')
-rw-r--r--sound/core/rawmidi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 4f4b4101b2f5..7c20eafecb8a 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -101,7 +101,7 @@ static int snd_rawmidi_runtime_create(snd_rawmidi_substream_t * substream)
{
snd_rawmidi_runtime_t *runtime;
- if ((runtime = kcalloc(1, sizeof(*runtime), GFP_KERNEL)) == NULL)
+ if ((runtime = kzalloc(sizeof(*runtime), GFP_KERNEL)) == NULL)
return -ENOMEM;
spin_lock_init(&runtime->lock);
init_waitqueue_head(&runtime->sleep);
@@ -1374,7 +1374,7 @@ static int snd_rawmidi_alloc_substreams(snd_rawmidi_t *rmidi,
INIT_LIST_HEAD(&stream->substreams);
for (idx = 0; idx < count; idx++) {
- substream = kcalloc(1, sizeof(*substream), GFP_KERNEL);
+ substream = kzalloc(sizeof(*substream), GFP_KERNEL);
if (substream == NULL)
return -ENOMEM;
substream->stream = direction;
@@ -1417,7 +1417,7 @@ int snd_rawmidi_new(snd_card_t * card, char *id, int device,
snd_assert(rrawmidi != NULL, return -EINVAL);
*rrawmidi = NULL;
snd_assert(card != NULL, return -ENXIO);
- rmidi = kcalloc(1, sizeof(*rmidi), GFP_KERNEL);
+ rmidi = kzalloc(sizeof(*rmidi), GFP_KERNEL);
if (rmidi == NULL)
return -ENOMEM;
rmidi->card = card;