diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-08 11:21:52 +0100 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-03-27 09:29:02 +0200 |
commit | 06ff37ffb4ba8bcbda0e9d19c712c954ef7b8a0a (patch) | |
tree | 67eb8baf5abbd0776d7fe1c13106c6c9bfe10750 /drivers/block/DAC960.c | |
parent | 28832e83379afd0b0e83b78ac317290c79ebd496 (diff) | |
download | kernel_samsung_espresso10-06ff37ffb4ba8bcbda0e9d19c712c954ef7b8a0a.zip kernel_samsung_espresso10-06ff37ffb4ba8bcbda0e9d19c712c954ef7b8a0a.tar.gz kernel_samsung_espresso10-06ff37ffb4ba8bcbda0e9d19c712c954ef7b8a0a.tar.bz2 |
[PATCH] kzalloc() conversion in drivers/block
this patch converts drivers/block to kzalloc usage.
Compile tested with allyesconfig.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/block/DAC960.c')
-rw-r--r-- | drivers/block/DAC960.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 9bdea2a..49c7cd5 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -311,11 +311,10 @@ static boolean DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller) CommandsRemaining = CommandAllocationGroupSize; CommandGroupByteCount = CommandsRemaining * CommandAllocationLength; - AllocationPointer = kmalloc(CommandGroupByteCount, GFP_ATOMIC); + AllocationPointer = kzalloc(CommandGroupByteCount, GFP_ATOMIC); if (AllocationPointer == NULL) return DAC960_Failure(Controller, "AUXILIARY STRUCTURE CREATION"); - memset(AllocationPointer, 0, CommandGroupByteCount); } Command = (DAC960_Command_T *) AllocationPointer; AllocationPointer += CommandAllocationLength; @@ -2709,14 +2708,12 @@ DAC960_DetectController(struct pci_dev *PCI_Device, void __iomem *BaseAddress; int i; - Controller = (DAC960_Controller_T *) - kmalloc(sizeof(DAC960_Controller_T), GFP_ATOMIC); + Controller = kzalloc(sizeof(DAC960_Controller_T), GFP_ATOMIC); if (Controller == NULL) { DAC960_Error("Unable to allocate Controller structure for " "Controller at\n", NULL); return NULL; } - memset(Controller, 0, sizeof(DAC960_Controller_T)); Controller->ControllerNumber = DAC960_ControllerCount; DAC960_Controllers[DAC960_ControllerCount++] = Controller; Controller->Bus = PCI_Device->bus->number; |