From 999a7bc5f75fe00f22cf862dc316e659253721ce Mon Sep 17 00:00:00 2001 From: Bruno George de Moraes Date: Tue, 5 Aug 2014 21:47:33 -0300 Subject: [PATCH] Use kzalloc that is order of magnitude faster and saves .text compared with kcalloc --- sound/arm/bcm2835-vchiq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c index cfa669ec57eb87..bae6565d7d6081 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -261,11 +261,10 @@ static AUDIO_INSTANCE_T *vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance, return NULL; } /* Allocate memory for this instance */ - instance = kmalloc(sizeof(*instance), GFP_KERNEL); + instance = kzalloc(sizeof(*instance), GFP_KERNEL); if (!instance) return NULL; - memset(instance, 0, sizeof(*instance)); instance->num_connections = num_connections; /* Create a lock for exclusive, serialized VCHI connection access */