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/control.c | |
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/control.c')
-rw-r--r-- | sound/core/control.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 227f3cf02771..736edf358e05 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -69,7 +69,7 @@ static int snd_ctl_open(struct inode *inode, struct file *file) | |||
69 | err = -EFAULT; | 69 | err = -EFAULT; |
70 | goto __error2; | 70 | goto __error2; |
71 | } | 71 | } |
72 | ctl = kcalloc(1, sizeof(*ctl), GFP_KERNEL); | 72 | ctl = kzalloc(sizeof(*ctl), GFP_KERNEL); |
73 | if (ctl == NULL) { | 73 | if (ctl == NULL) { |
74 | err = -ENOMEM; | 74 | err = -ENOMEM; |
75 | goto __error; | 75 | goto __error; |
@@ -162,7 +162,7 @@ void snd_ctl_notify(snd_card_t *card, unsigned int mask, snd_ctl_elem_id_t *id) | |||
162 | goto _found; | 162 | goto _found; |
163 | } | 163 | } |
164 | } | 164 | } |
165 | ev = kcalloc(1, sizeof(*ev), GFP_ATOMIC); | 165 | ev = kzalloc(sizeof(*ev), GFP_ATOMIC); |
166 | if (ev) { | 166 | if (ev) { |
167 | ev->id = *id; | 167 | ev->id = *id; |
168 | ev->mask = mask; | 168 | ev->mask = mask; |
@@ -195,7 +195,7 @@ snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * control, unsigned int access) | |||
195 | 195 | ||
196 | snd_runtime_check(control != NULL, return NULL); | 196 | snd_runtime_check(control != NULL, return NULL); |
197 | snd_runtime_check(control->count > 0, return NULL); | 197 | snd_runtime_check(control->count > 0, return NULL); |
198 | kctl = kcalloc(1, sizeof(*kctl) + sizeof(snd_kcontrol_volatile_t) * control->count, GFP_KERNEL); | 198 | kctl = kzalloc(sizeof(*kctl) + sizeof(snd_kcontrol_volatile_t) * control->count, GFP_KERNEL); |
199 | if (kctl == NULL) | 199 | if (kctl == NULL) |
200 | return NULL; | 200 | return NULL; |
201 | *kctl = *control; | 201 | *kctl = *control; |
@@ -521,7 +521,7 @@ static int snd_ctl_card_info(snd_card_t * card, snd_ctl_file_t * ctl, | |||
521 | { | 521 | { |
522 | snd_ctl_card_info_t *info; | 522 | snd_ctl_card_info_t *info; |
523 | 523 | ||
524 | info = kcalloc(1, sizeof(*info), GFP_KERNEL); | 524 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
525 | if (! info) | 525 | if (! info) |
526 | return -ENOMEM; | 526 | return -ENOMEM; |
527 | down_read(&snd_ioctl_rwsem); | 527 | down_read(&snd_ioctl_rwsem); |
@@ -929,7 +929,7 @@ static int snd_ctl_elem_add(snd_ctl_file_t *file, snd_ctl_elem_info_t *info, int | |||
929 | return -EINVAL; | 929 | return -EINVAL; |
930 | } | 930 | } |
931 | private_size *= info->count; | 931 | private_size *= info->count; |
932 | ue = kcalloc(1, sizeof(struct user_element) + private_size, GFP_KERNEL); | 932 | ue = kzalloc(sizeof(struct user_element) + private_size, GFP_KERNEL); |
933 | if (ue == NULL) | 933 | if (ue == NULL) |
934 | return -ENOMEM; | 934 | return -ENOMEM; |
935 | ue->info = *info; | 935 | ue->info = *info; |
@@ -1185,7 +1185,7 @@ static int _snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head * | |||
1185 | { | 1185 | { |
1186 | snd_kctl_ioctl_t *pn; | 1186 | snd_kctl_ioctl_t *pn; |
1187 | 1187 | ||
1188 | pn = kcalloc(1, sizeof(snd_kctl_ioctl_t), GFP_KERNEL); | 1188 | pn = kzalloc(sizeof(snd_kctl_ioctl_t), GFP_KERNEL); |
1189 | if (pn == NULL) | 1189 | if (pn == NULL) |
1190 | return -ENOMEM; | 1190 | return -ENOMEM; |
1191 | pn->fioctl = fcn; | 1191 | pn->fioctl = fcn; |