diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-09-09 14:20:49 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 10:48:06 +0200 |
commit | ecca82b4b447f8df73c807a018dac3e2863912d9 (patch) | |
tree | 473018d17b1616e6b74d1924f046866214c38c96 /sound/core | |
parent | ca2c0966562cfbf9273167a5b60e8fddc24078d6 (diff) |
[ALSA] Replace with kzalloc() - seq stuff
ALSA sequencer,Instrument layer,ALSA<-OSS sequencer
Replace kcalloc(1,..) with kzalloc().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/seq/instr/ainstr_gf1.c | 2 | ||||
-rw-r--r-- | sound/core/seq/instr/ainstr_iw.c | 6 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_init.c | 2 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_midi.c | 6 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_readq.c | 2 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_synth.c | 4 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_timer.c | 2 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_writeq.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_clientmgr.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_device.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_dummy.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_fifo.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_instr.c | 4 | ||||
-rw-r--r-- | sound/core/seq/seq_memory.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_midi.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_midi_event.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_ports.c | 4 | ||||
-rw-r--r-- | sound/core/seq/seq_prioq.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_queue.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_system.c | 4 | ||||
-rw-r--r-- | sound/core/seq/seq_timer.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_virmidi.c | 6 |
22 files changed, 32 insertions, 32 deletions
diff --git a/sound/core/seq/instr/ainstr_gf1.c b/sound/core/seq/instr/ainstr_gf1.c index 32e91c6b25f..207c2c54bf1 100644 --- a/sound/core/seq/instr/ainstr_gf1.c +++ b/sound/core/seq/instr/ainstr_gf1.c @@ -61,7 +61,7 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops, return -EFAULT; *data += sizeof(xp); *len -= sizeof(xp); - wp = kcalloc(1, sizeof(*wp), gfp_mask); + wp = kzalloc(sizeof(*wp), gfp_mask); if (wp == NULL) return -ENOMEM; wp->share_id[0] = le32_to_cpu(xp.share_id[0]); diff --git a/sound/core/seq/instr/ainstr_iw.c b/sound/core/seq/instr/ainstr_iw.c index 2622b8679ca..b3cee092b1a 100644 --- a/sound/core/seq/instr/ainstr_iw.c +++ b/sound/core/seq/instr/ainstr_iw.c @@ -92,7 +92,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype, points_size = (le16_to_cpu(rx.nattack) + le16_to_cpu(rx.nrelease)) * 2 * sizeof(__u16); if (points_size > *len) return -EINVAL; - rp = kcalloc(1, sizeof(*rp) + points_size, gfp_mask); + rp = kzalloc(sizeof(*rp) + points_size, gfp_mask); if (rp == NULL) return -ENOMEM; rp->nattack = le16_to_cpu(rx.nattack); @@ -139,7 +139,7 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops, return -EFAULT; *data += sizeof(xp); *len -= sizeof(xp); - wp = kcalloc(1, sizeof(*wp), gfp_mask); + wp = kzalloc(sizeof(*wp), gfp_mask); if (wp == NULL) return -ENOMEM; wp->share_id[0] = le32_to_cpu(xp.share_id[0]); @@ -273,7 +273,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr, snd_seq_iwffff_instr_free(ops, ip, atomic); return -EINVAL; } - lp = kcalloc(1, sizeof(*lp), gfp_mask); + lp = kzalloc(sizeof(*lp), gfp_mask); if (lp == NULL) { snd_seq_iwffff_instr_free(ops, ip, atomic); return -ENOMEM; diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index bac4b4f1a94..1ab1cf8158c 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -193,7 +193,7 @@ snd_seq_oss_open(struct file *file, int level) int i, rc; seq_oss_devinfo_t *dp; - if ((dp = kcalloc(1, sizeof(*dp), GFP_KERNEL)) == NULL) { + if ((dp = kzalloc(sizeof(*dp), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc device info\n"); return -ENOMEM; } diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c index 9aece6c65db..f0e95c8f2ee 100644 --- a/sound/core/seq/oss/seq_oss_midi.c +++ b/sound/core/seq/oss/seq_oss_midi.c @@ -76,8 +76,8 @@ snd_seq_oss_midi_lookup_ports(int client) snd_seq_client_info_t *clinfo; snd_seq_port_info_t *pinfo; - clinfo = kcalloc(1, sizeof(*clinfo), GFP_KERNEL); - pinfo = kcalloc(1, sizeof(*pinfo), GFP_KERNEL); + clinfo = kzalloc(sizeof(*clinfo), GFP_KERNEL); + pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL); if (! clinfo || ! pinfo) { kfree(clinfo); kfree(pinfo); @@ -172,7 +172,7 @@ snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo) /* * allocate midi info record */ - if ((mdev = kcalloc(1, sizeof(*mdev), GFP_KERNEL)) == NULL) { + if ((mdev = kzalloc(sizeof(*mdev), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc midi info\n"); return -ENOMEM; } diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c index 0a6f2a64f69..55571e15cd3 100644 --- a/sound/core/seq/oss/seq_oss_readq.c +++ b/sound/core/seq/oss/seq_oss_readq.c @@ -46,7 +46,7 @@ snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen) { seq_oss_readq_t *q; - if ((q = kcalloc(1, sizeof(*q), GFP_KERNEL)) == NULL) { + if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc read queue\n"); return NULL; } diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index 1a7736cbf3a..8257fce2ca1 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c @@ -103,7 +103,7 @@ snd_seq_oss_synth_register(snd_seq_device_t *dev) snd_seq_oss_reg_t *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev); unsigned long flags; - if ((rec = kcalloc(1, sizeof(*rec), GFP_KERNEL)) == NULL) { + if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc synth info\n"); return -ENOMEM; } @@ -499,7 +499,7 @@ snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_ sysex = dp->synths[dev].sysex; if (sysex == NULL) { - sysex = kcalloc(1, sizeof(*sysex), GFP_KERNEL); + sysex = kzalloc(sizeof(*sysex), GFP_KERNEL); if (sysex == NULL) return -ENOMEM; dp->synths[dev].sysex = sysex; diff --git a/sound/core/seq/oss/seq_oss_timer.c b/sound/core/seq/oss/seq_oss_timer.c index 42ca9493fa6..64d594b3170 100644 --- a/sound/core/seq/oss/seq_oss_timer.c +++ b/sound/core/seq/oss/seq_oss_timer.c @@ -46,7 +46,7 @@ snd_seq_oss_timer_new(seq_oss_devinfo_t *dp) { seq_oss_timer_t *rec; - rec = kcalloc(1, sizeof(*rec), GFP_KERNEL); + rec = kzalloc(sizeof(*rec), GFP_KERNEL); if (rec == NULL) return NULL; diff --git a/sound/core/seq/oss/seq_oss_writeq.c b/sound/core/seq/oss/seq_oss_writeq.c index 87f85f7ee81..b2037802454 100644 --- a/sound/core/seq/oss/seq_oss_writeq.c +++ b/sound/core/seq/oss/seq_oss_writeq.c @@ -38,7 +38,7 @@ snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen) seq_oss_writeq_t *q; snd_seq_client_pool_t pool; - if ((q = kcalloc(1, sizeof(*q), GFP_KERNEL)) == NULL) + if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) return NULL; q->dp = dp; q->maxlen = maxlen; diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index bd106625a78..a886db94b1f 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -203,7 +203,7 @@ static client_t *seq_create_client1(int client_index, int poolsize) client_t *client; /* init client data */ - client = kcalloc(1, sizeof(*client), GFP_KERNEL); + client = kzalloc(sizeof(*client), GFP_KERNEL); if (client == NULL) return NULL; client->pool = snd_seq_pool_new(poolsize); diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c index 4d80f39612e..252b5273100 100644 --- a/sound/core/seq/seq_device.c +++ b/sound/core/seq/seq_device.c @@ -200,7 +200,7 @@ int snd_seq_device_new(snd_card_t *card, int device, char *id, int argsize, if (ops == NULL) return -ENOMEM; - dev = kcalloc(1, sizeof(*dev)*2 + argsize, GFP_KERNEL); + dev = kzalloc(sizeof(*dev)*2 + argsize, GFP_KERNEL); if (dev == NULL) { unlock_driver(ops); return -ENOMEM; diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c index ea945a5d2a0..5dd0e6a19e5 100644 --- a/sound/core/seq/seq_dummy.c +++ b/sound/core/seq/seq_dummy.c @@ -153,7 +153,7 @@ create_port(int idx, int type) snd_seq_port_callback_t pcb; snd_seq_dummy_port_t *rec; - if ((rec = kcalloc(1, sizeof(*rec), GFP_KERNEL)) == NULL) + if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) return NULL; rec->client = my_client; diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c index 3b7647ca7ad..4767cfdc361 100644 --- a/sound/core/seq/seq_fifo.c +++ b/sound/core/seq/seq_fifo.c @@ -33,7 +33,7 @@ fifo_t *snd_seq_fifo_new(int poolsize) { fifo_t *f; - f = kcalloc(1, sizeof(*f), GFP_KERNEL); + f = kzalloc(sizeof(*f), GFP_KERNEL); if (f == NULL) { snd_printd("malloc failed for snd_seq_fifo_new() \n"); return NULL; diff --git a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c index 5b40ea2ba8f..019d43a462d 100644 --- a/sound/core/seq/seq_instr.c +++ b/sound/core/seq/seq_instr.c @@ -53,7 +53,7 @@ static snd_seq_kinstr_t *snd_seq_instr_new(int add_len, int atomic) { snd_seq_kinstr_t *instr; - instr = kcalloc(1, sizeof(snd_seq_kinstr_t) + add_len, atomic ? GFP_ATOMIC : GFP_KERNEL); + instr = kzalloc(sizeof(snd_seq_kinstr_t) + add_len, atomic ? GFP_ATOMIC : GFP_KERNEL); if (instr == NULL) return NULL; instr->add_len = add_len; @@ -77,7 +77,7 @@ snd_seq_kinstr_list_t *snd_seq_instr_list_new(void) { snd_seq_kinstr_list_t *list; - list = kcalloc(1, sizeof(snd_seq_kinstr_list_t), GFP_KERNEL); + list = kzalloc(sizeof(snd_seq_kinstr_list_t), GFP_KERNEL); if (list == NULL) return NULL; spin_lock_init(&list->lock); diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index 03acb2d519b..d4d7d326c4b 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c @@ -452,7 +452,7 @@ pool_t *snd_seq_pool_new(int poolsize) pool_t *pool; /* create pool block */ - pool = kcalloc(1, sizeof(*pool), GFP_KERNEL); + pool = kzalloc(sizeof(*pool), GFP_KERNEL); if (pool == NULL) { snd_printd("seq: malloc failed for pool\n"); return NULL; diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c index 4374829ea77..b4674ae3bc3 100644 --- a/sound/core/seq/seq_midi.c +++ b/sound/core/seq/seq_midi.c @@ -322,7 +322,7 @@ snd_seq_midisynth_register_port(snd_seq_device_t *dev) client = synths[card->number]; if (client == NULL) { newclient = 1; - client = kcalloc(1, sizeof(*client), GFP_KERNEL); + client = kzalloc(sizeof(*client), GFP_KERNEL); if (client == NULL) { up(®ister_mutex); kfree(info); diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c index 603b63716db..2dc1aecfb42 100644 --- a/sound/core/seq/seq_midi_event.c +++ b/sound/core/seq/seq_midi_event.c @@ -118,7 +118,7 @@ int snd_midi_event_new(int bufsize, snd_midi_event_t **rdev) snd_midi_event_t *dev; *rdev = NULL; - dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); + dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (dev == NULL) return -ENOMEM; if (bufsize > 0) { diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c index b976951fc10..57ec31df0d1 100644 --- a/sound/core/seq/seq_ports.c +++ b/sound/core/seq/seq_ports.c @@ -141,7 +141,7 @@ client_port_t *snd_seq_create_port(client_t *client, int port) } /* create a new port */ - new_port = kcalloc(1, sizeof(*new_port), GFP_KERNEL); + new_port = kzalloc(sizeof(*new_port), GFP_KERNEL); if (! new_port) { snd_printd("malloc failed for registering client port\n"); return NULL; /* failure, out of memory */ @@ -488,7 +488,7 @@ int snd_seq_port_connect(client_t *connector, unsigned long flags; int exclusive; - subs = kcalloc(1, sizeof(*subs), GFP_KERNEL); + subs = kzalloc(sizeof(*subs), GFP_KERNEL); if (! subs) return -ENOMEM; diff --git a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c index a519732ed83..cd641bca994 100644 --- a/sound/core/seq/seq_prioq.c +++ b/sound/core/seq/seq_prioq.c @@ -59,7 +59,7 @@ prioq_t *snd_seq_prioq_new(void) { prioq_t *f; - f = kcalloc(1, sizeof(*f), GFP_KERNEL); + f = kzalloc(sizeof(*f), GFP_KERNEL); if (f == NULL) { snd_printd("oops: malloc failed for snd_seq_prioq_new()\n"); return NULL; diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c index 98de2e711fd..5f5c3cb37cb 100644 --- a/sound/core/seq/seq_queue.c +++ b/sound/core/seq/seq_queue.c @@ -111,7 +111,7 @@ static queue_t *queue_new(int owner, int locked) { queue_t *q; - q = kcalloc(1, sizeof(*q), GFP_KERNEL); + q = kzalloc(sizeof(*q), GFP_KERNEL); if (q == NULL) { snd_printd("malloc failed for snd_seq_queue_new()\n"); return NULL; diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c index e8f0a6683d5..0d9eff85ab8 100644 --- a/sound/core/seq/seq_system.c +++ b/sound/core/seq/seq_system.c @@ -126,8 +126,8 @@ int __init snd_seq_system_client_init(void) snd_seq_client_info_t *inf; snd_seq_port_info_t *port; - inf = kcalloc(1, sizeof(*inf), GFP_KERNEL); - port = kcalloc(1, sizeof(*port), GFP_KERNEL); + inf = kzalloc(sizeof(*inf), GFP_KERNEL); + port = kzalloc(sizeof(*port), GFP_KERNEL); if (! inf || ! port) { kfree(inf); kfree(port); diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c index a7f76fc9528..b57a3c07ff6 100644 --- a/sound/core/seq/seq_timer.c +++ b/sound/core/seq/seq_timer.c @@ -60,7 +60,7 @@ seq_timer_t *snd_seq_timer_new(void) { seq_timer_t *tmr; - tmr = kcalloc(1, sizeof(*tmr), GFP_KERNEL); + tmr = kzalloc(sizeof(*tmr), GFP_KERNEL); if (tmr == NULL) { snd_printd("malloc failed for snd_seq_timer_new() \n"); return NULL; diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c index a66484b5cf0..e4f512aa742 100644 --- a/sound/core/seq/seq_virmidi.c +++ b/sound/core/seq/seq_virmidi.c @@ -205,7 +205,7 @@ static int snd_virmidi_input_open(snd_rawmidi_substream_t * substream) snd_virmidi_t *vmidi; unsigned long flags; - vmidi = kcalloc(1, sizeof(*vmidi), GFP_KERNEL); + vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL); if (vmidi == NULL) return -ENOMEM; vmidi->substream = substream; @@ -233,7 +233,7 @@ static int snd_virmidi_output_open(snd_rawmidi_substream_t * substream) snd_rawmidi_runtime_t *runtime = substream->runtime; snd_virmidi_t *vmidi; - vmidi = kcalloc(1, sizeof(*vmidi), GFP_KERNEL); + vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL); if (vmidi == NULL) return -ENOMEM; vmidi->substream = substream; @@ -508,7 +508,7 @@ int snd_virmidi_new(snd_card_t *card, int device, snd_rawmidi_t **rrmidi) &rmidi)) < 0) return err; strcpy(rmidi->name, rmidi->id); - rdev = kcalloc(1, sizeof(*rdev), GFP_KERNEL); + rdev = kzalloc(sizeof(*rdev), GFP_KERNEL); if (rdev == NULL) { snd_device_free(card, rmidi); return -ENOMEM; |