diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-09-09 08:20:23 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 04:47:59 -0400 |
commit | ca2c0966562cfbf9273167a5b60e8fddc24078d6 (patch) | |
tree | 0292047f4cd0a24e1b24914081ebe890bb535877 /sound/core/oss | |
parent | 8648811f1db85eeacb821591ef11a2c229c29aa0 (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/oss')
-rw-r--r-- | sound/core/oss/mixer_oss.c | 26 | ||||
-rw-r--r-- | sound/core/oss/pcm_oss.c | 2 | ||||
-rw-r--r-- | sound/core/oss/pcm_plugin.c | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 98fc0766f885..69e1059112d1 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) | |||
53 | err = snd_card_file_add(card, file); | 53 | err = snd_card_file_add(card, file); |
54 | if (err < 0) | 54 | if (err < 0) |
55 | return err; | 55 | return err; |
56 | fmixer = kcalloc(1, sizeof(*fmixer), GFP_KERNEL); | 56 | fmixer = kzalloc(sizeof(*fmixer), GFP_KERNEL); |
57 | if (fmixer == NULL) { | 57 | if (fmixer == NULL) { |
58 | snd_card_file_remove(card, file); | 58 | snd_card_file_remove(card, file); |
59 | return -ENOMEM; | 59 | return -ENOMEM; |
@@ -517,8 +517,8 @@ static void snd_mixer_oss_get_volume1_vol(snd_mixer_oss_file_t *fmixer, | |||
517 | up_read(&card->controls_rwsem); | 517 | up_read(&card->controls_rwsem); |
518 | return; | 518 | return; |
519 | } | 519 | } |
520 | uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); | 520 | uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); |
521 | uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); | 521 | uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); |
522 | if (uinfo == NULL || uctl == NULL) | 522 | if (uinfo == NULL || uctl == NULL) |
523 | goto __unalloc; | 523 | goto __unalloc; |
524 | snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); | 524 | 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, | |||
551 | up_read(&card->controls_rwsem); | 551 | up_read(&card->controls_rwsem); |
552 | return; | 552 | return; |
553 | } | 553 | } |
554 | uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); | 554 | uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); |
555 | uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); | 555 | uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); |
556 | if (uinfo == NULL || uctl == NULL) | 556 | if (uinfo == NULL || uctl == NULL) |
557 | goto __unalloc; | 557 | goto __unalloc; |
558 | snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); | 558 | 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, | |||
612 | down_read(&card->controls_rwsem); | 612 | down_read(&card->controls_rwsem); |
613 | if ((kctl = snd_ctl_find_numid(card, numid)) == NULL) | 613 | if ((kctl = snd_ctl_find_numid(card, numid)) == NULL) |
614 | return; | 614 | return; |
615 | uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); | 615 | uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); |
616 | uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); | 616 | uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); |
617 | if (uinfo == NULL || uctl == NULL) | 617 | if (uinfo == NULL || uctl == NULL) |
618 | goto __unalloc; | 618 | goto __unalloc; |
619 | snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); | 619 | 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, | |||
649 | up_read(&fmixer->card->controls_rwsem); | 649 | up_read(&fmixer->card->controls_rwsem); |
650 | return; | 650 | return; |
651 | } | 651 | } |
652 | uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); | 652 | uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); |
653 | uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); | 653 | uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); |
654 | if (uinfo == NULL || uctl == NULL) | 654 | if (uinfo == NULL || uctl == NULL) |
655 | goto __unalloc; | 655 | goto __unalloc; |
656 | snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); | 656 | 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 | |||
768 | snd_ctl_elem_value_t *uctl; | 768 | snd_ctl_elem_value_t *uctl; |
769 | int err, idx; | 769 | int err, idx; |
770 | 770 | ||
771 | uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); | 771 | uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); |
772 | uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); | 772 | uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); |
773 | if (uinfo == NULL || uctl == NULL) { | 773 | if (uinfo == NULL || uctl == NULL) { |
774 | err = -ENOMEM; | 774 | err = -ENOMEM; |
775 | goto __unlock; | 775 | goto __unlock; |
@@ -813,8 +813,8 @@ static int snd_mixer_oss_put_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int | |||
813 | int err; | 813 | int err; |
814 | unsigned int idx; | 814 | unsigned int idx; |
815 | 815 | ||
816 | uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); | 816 | uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); |
817 | uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); | 817 | uctl = kzalloc(sizeof(*uctl), GFP_KERNEL); |
818 | if (uinfo == NULL || uctl == NULL) { | 818 | if (uinfo == NULL || uctl == NULL) { |
819 | err = -ENOMEM; | 819 | err = -ENOMEM; |
820 | goto __unlock; | 820 | goto __unlock; |
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index a038fd8a53f3..842c28b2ed55 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, | |||
1740 | snd_assert(rpcm_oss_file != NULL, return -EINVAL); | 1740 | snd_assert(rpcm_oss_file != NULL, return -EINVAL); |
1741 | *rpcm_oss_file = NULL; | 1741 | *rpcm_oss_file = NULL; |
1742 | 1742 | ||
1743 | pcm_oss_file = kcalloc(1, sizeof(*pcm_oss_file), GFP_KERNEL); | 1743 | pcm_oss_file = kzalloc(sizeof(*pcm_oss_file), GFP_KERNEL); |
1744 | if (pcm_oss_file == NULL) | 1744 | if (pcm_oss_file == NULL) |
1745 | return -ENOMEM; | 1745 | return -ENOMEM; |
1746 | 1746 | ||
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c index 6430410c6c04..fc23373c000d 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, | |||
171 | 171 | ||
172 | snd_assert(plug != NULL, return -ENXIO); | 172 | snd_assert(plug != NULL, return -ENXIO); |
173 | snd_assert(src_format != NULL && dst_format != NULL, return -ENXIO); | 173 | snd_assert(src_format != NULL && dst_format != NULL, return -ENXIO); |
174 | plugin = kcalloc(1, sizeof(*plugin) + extra, GFP_KERNEL); | 174 | plugin = kzalloc(sizeof(*plugin) + extra, GFP_KERNEL); |
175 | if (plugin == NULL) | 175 | if (plugin == NULL) |
176 | return -ENOMEM; | 176 | return -ENOMEM; |
177 | plugin->name = name; | 177 | plugin->name = name; |