diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-08 05:21:52 -0500 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-03-27 02:29:02 -0500 |
commit | 06ff37ffb4ba8bcbda0e9d19c712c954ef7b8a0a (patch) | |
tree | 67eb8baf5abbd0776d7fe1c13106c6c9bfe10750 /drivers/block/DAC960.c | |
parent | 28832e83379afd0b0e83b78ac317290c79ebd496 (diff) |
[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 9bdea2a5cf0e..49c7cd558ddf 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -311,11 +311,10 @@ static boolean DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller) | |||
311 | CommandsRemaining = CommandAllocationGroupSize; | 311 | CommandsRemaining = CommandAllocationGroupSize; |
312 | CommandGroupByteCount = | 312 | CommandGroupByteCount = |
313 | CommandsRemaining * CommandAllocationLength; | 313 | CommandsRemaining * CommandAllocationLength; |
314 | AllocationPointer = kmalloc(CommandGroupByteCount, GFP_ATOMIC); | 314 | AllocationPointer = kzalloc(CommandGroupByteCount, GFP_ATOMIC); |
315 | if (AllocationPointer == NULL) | 315 | if (AllocationPointer == NULL) |
316 | return DAC960_Failure(Controller, | 316 | return DAC960_Failure(Controller, |
317 | "AUXILIARY STRUCTURE CREATION"); | 317 | "AUXILIARY STRUCTURE CREATION"); |
318 | memset(AllocationPointer, 0, CommandGroupByteCount); | ||
319 | } | 318 | } |
320 | Command = (DAC960_Command_T *) AllocationPointer; | 319 | Command = (DAC960_Command_T *) AllocationPointer; |
321 | AllocationPointer += CommandAllocationLength; | 320 | AllocationPointer += CommandAllocationLength; |
@@ -2709,14 +2708,12 @@ DAC960_DetectController(struct pci_dev *PCI_Device, | |||
2709 | void __iomem *BaseAddress; | 2708 | void __iomem *BaseAddress; |
2710 | int i; | 2709 | int i; |
2711 | 2710 | ||
2712 | Controller = (DAC960_Controller_T *) | 2711 | Controller = kzalloc(sizeof(DAC960_Controller_T), GFP_ATOMIC); |
2713 | kmalloc(sizeof(DAC960_Controller_T), GFP_ATOMIC); | ||
2714 | if (Controller == NULL) { | 2712 | if (Controller == NULL) { |
2715 | DAC960_Error("Unable to allocate Controller structure for " | 2713 | DAC960_Error("Unable to allocate Controller structure for " |
2716 | "Controller at\n", NULL); | 2714 | "Controller at\n", NULL); |
2717 | return NULL; | 2715 | return NULL; |
2718 | } | 2716 | } |
2719 | memset(Controller, 0, sizeof(DAC960_Controller_T)); | ||
2720 | Controller->ControllerNumber = DAC960_ControllerCount; | 2717 | Controller->ControllerNumber = DAC960_ControllerCount; |
2721 | DAC960_Controllers[DAC960_ControllerCount++] = Controller; | 2718 | DAC960_Controllers[DAC960_ControllerCount++] = Controller; |
2722 | Controller->Bus = PCI_Device->bus->number; | 2719 | Controller->Bus = PCI_Device->bus->number; |