[STAGING] slicoss - use kzalloc

From: Lior Dotan
Date: Tue Nov 04 2008 - 11:28:31 EST


This patch uses kzalloc() where applicable.

Signed-off-by: Lior Dotan <liodot@xxxxxxxxx> --- b/drivers/staging/slicoss/slicoss.c 2008-11-04 11:53:12.878116772 +0200
+++ a/drivers/staging/slicoss/slicoss.c 2008-11-04 12:08:40.800644774 +0200
@@ -2673,7 +2673,7 @@ static int slic_card_init(struct sliccar

#if SLIC_DUMP_ENABLED
if (!card->dumpbuffer) {
- card->dumpbuffer = kmalloc(DUMP_PAGE_SIZE, GFP_ATOMIC);
+ card->dumpbuffer = kzalloc(DUMP_PAGE_SIZE, GFP_ATOMIC);

ASSERT(card->dumpbuffer);
if (card->dumpbuffer == NULL)
@@ -2683,7 +2683,6 @@ static int slic_card_init(struct sliccar
* Smear the shared memory structure and then obtain
* the PHYSICAL address of this structure
*/
- memset(card->dumpbuffer, 0, DUMP_PAGE_SIZE);
card->dumpbuffer_phys = virt_to_bus(card->dumpbuffer);
card->dumpbuffer_physh = SLIC_GET_ADDR_HIGH(card->dumpbuffer_phys);
card->dumpbuffer_physl = SLIC_GET_ADDR_LOW(card->dumpbuffer_phys);
@@ -2692,7 +2691,7 @@ static int slic_card_init(struct sliccar
* Allocate COMMAND BUFFER
*/
if (!card->cmdbuffer) {
- card->cmdbuffer = kmalloc(sizeof(struct dump_cmd), GFP_ATOMIC);
+ card->cmdbuffer = kzalloc(sizeof(struct dump_cmd), GFP_ATOMIC);

ASSERT(card->cmdbuffer);
if (card->cmdbuffer == NULL)
@@ -2702,7 +2701,6 @@ static int slic_card_init(struct sliccar
* Smear the shared memory structure and then obtain
* the PHYSICAL address of this structure
*/
- memset(card->cmdbuffer, 0, sizeof(struct dump_cmd));
card->cmdbuffer_phys = virt_to_bus(card->cmdbuffer);
card->cmdbuffer_physh = SLIC_GET_ADDR_HIGH(card->cmdbuffer_phys);
card->cmdbuffer_physl = SLIC_GET_ADDR_LOW(card->cmdbuffer_phys);
@@ -2833,9 +2831,8 @@ static u32 slic_card_locate(struct adapt
}
if (!physcard) {
/* no structure allocated for this physical card yet */
- physcard = kmalloc(sizeof(struct physcard *), GFP_ATOMIC);
+ physcard = kzalloc(sizeof(struct physcard *), GFP_ATOMIC);
ASSERT(physcard);
- memset(physcard, 0, sizeof(struct physcard *));

DBG_MSG
("\n%s Allocate a PHYSICALcard:\n PHYSICAL_Card[%p]\n\