Reanem kzalloc to kmm_zalloc for consistency

This commit is contained in:
Gregory Nutt
2014-08-31 17:34:44 -06:00
parent ff2442a02e
commit 205260d5e2
76 changed files with 116 additions and 116 deletions
+2 -2
View File
@@ -882,14 +882,14 @@ int audio_register(FAR const char *name, FAR struct audio_lowerhalf_s *dev)
/* Allocate the upper-half data structure */
upper = (FAR struct audio_upperhalf_s *)kzalloc(sizeof(struct audio_upperhalf_s));
upper = (FAR struct audio_upperhalf_s *)kmm_zalloc(sizeof(struct audio_upperhalf_s));
if (!upper)
{
auddbg("Allocation failed\n");
return -ENOMEM;
}
/* Initialize the Audio device structure (it was already zeroed by kzalloc()) */
/* Initialize the Audio device structure (it was already zeroed by kmm_zalloc()) */
sem_init(&upper->exclsem, 0, 1);
upper->dev = dev;
+2 -2
View File
@@ -1375,14 +1375,14 @@ FAR struct audio_lowerhalf_s *
/* Allocate an instance of our private data structure */
priv = (FAR struct pcm_decode_s *)kzalloc(sizeof(struct pcm_decode_s));
priv = (FAR struct pcm_decode_s *)kmm_zalloc(sizeof(struct pcm_decode_s));
if (!priv)
{
auddbg("ERROR: Failed to allocate driver structure\n");
return NULL;
}
/* Initialize our private data structure. Since kzalloc() was used for
/* Initialize our private data structure. Since kmm_zalloc() was used for
* the allocation, we need to initialize only non-zero, non-NULL, non-
* false fields.
*/