From ca2c0966562cfbf9273167a5b60e8fddc24078d6 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 9 Sep 2005 14:20:23 +0200 Subject: [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 --- sound/core/oss/mixer_oss.c | 26 +++++++++++++------------- sound/core/oss/pcm_oss.c | 2 +- sound/core/oss/pcm_plugin.c | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'sound/core/oss') diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 98fc0766f88..69e1059112d 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c @@ -53,7 +53,7 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file) err = snd_card_file_add(card, file); if (err < 0) return err; - fmixer = kcalloc(1, sizeof(*fmixer), GFP_KERNEL); + fmixer = kzalloc(sizeof(*fmixer), GFP_KERNEL); if (fmixer == NULL) { snd_card_file_remove(card, file); return -ENOMEM; @@ -517,8 +517,8 @@ static void snd_mixer_oss_get_volume1_vol(snd_mixer_oss_file_t *fmixer, up_read(&card->controls_rwsem); return; } - uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); - uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); + uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); + uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) goto __unalloc; snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); @@ -551,8 +551,8 @@ static void snd_mixer_oss_get_volume1_sw(snd_mixer_oss_file_t *fmixer, up_read(&card->controls_rwsem); return; } - uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); - uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); + uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); + uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) goto __unalloc; snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); @@ -612,8 +612,8 @@ static void snd_mixer_oss_put_volume1_vol(snd_mixer_oss_file_t *fmixer, down_read(&card->controls_rwsem); if ((kctl = snd_ctl_find_numid(card, numid)) == NULL) return; - uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); - uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); + uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); + uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) goto __unalloc; snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); @@ -649,8 +649,8 @@ static void snd_mixer_oss_put_volume1_sw(snd_mixer_oss_file_t *fmixer, up_read(&fmixer->card->controls_rwsem); return; } - uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); - uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); + uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); + uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) goto __unalloc; snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); @@ -768,8 +768,8 @@ static int snd_mixer_oss_get_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int snd_ctl_elem_value_t *uctl; int err, idx; - uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); - uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); + uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); + uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) { err = -ENOMEM; goto __unlock; @@ -813,8 +813,8 @@ static int snd_mixer_oss_put_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int int err; unsigned int idx; - uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); - uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); + uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); + uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) { err = -ENOMEM; goto __unlock; diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index a038fd8a53f..842c28b2ed5 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -1740,7 +1740,7 @@ static int snd_pcm_oss_open_file(struct file *file, snd_assert(rpcm_oss_file != NULL, return -EINVAL); *rpcm_oss_file = NULL; - pcm_oss_file = kcalloc(1, sizeof(*pcm_oss_file), GFP_KERNEL); + pcm_oss_file = kzalloc(sizeof(*pcm_oss_file), GFP_KERNEL); if (pcm_oss_file == NULL) return -ENOMEM; diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c index 6430410c6c0..fc23373c000 100644 --- a/sound/core/oss/pcm_plugin.c +++ b/sound/core/oss/pcm_plugin.c @@ -171,7 +171,7 @@ int snd_pcm_plugin_build(snd_pcm_plug_t *plug, snd_assert(plug != NULL, return -ENXIO); snd_assert(src_format != NULL && dst_format != NULL, return -ENXIO); - plugin = kcalloc(1, sizeof(*plugin) + extra, GFP_KERNEL); + plugin = kzalloc(sizeof(*plugin) + extra, GFP_KERNEL); if (plugin == NULL) return -ENOMEM; plugin->name = name; -- cgit v1.2.3