diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-15 12:48:01 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:47 -0700 |
commit | 0a72f3cf9f53ae0f4f1c6e05bb081d99b5d72db2 (patch) | |
tree | 224621be13f8cfe77606140ff7f8ec6c78cba1f8 | |
parent | e276a3a5781f1e1ce0f912cc909ade147fa86a53 (diff) | |
download | op-kernel-dev-0a72f3cf9f53ae0f4f1c6e05bb081d99b5d72db2.zip op-kernel-dev-0a72f3cf9f53ae0f4f1c6e05bb081d99b5d72db2.tar.gz |
Staging: hv: osd: remove MemAllocAtomic wrapper
Use the "real" kmalloc call instead of a wrapper function.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/hv/ChannelMgmt.c | 3 | ||||
-rw-r--r-- | drivers/staging/hv/Hv.c | 2 | ||||
-rw-r--r-- | drivers/staging/hv/NetVsc.c | 2 | ||||
-rw-r--r-- | drivers/staging/hv/Vmbus.c | 2 | ||||
-rw-r--r-- | drivers/staging/hv/include/osd.h | 1 | ||||
-rw-r--r-- | drivers/staging/hv/osd.c | 5 |
6 files changed, 4 insertions, 11 deletions
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c index eafc938..44bc61e 100644 --- a/drivers/staging/hv/ChannelMgmt.c +++ b/drivers/staging/hv/ChannelMgmt.c @@ -143,13 +143,12 @@ VMBUS_CHANNEL* AllocVmbusChannel(void) { VMBUS_CHANNEL* channel; - channel = (VMBUS_CHANNEL*) MemAllocAtomic(sizeof(VMBUS_CHANNEL)); + channel = kzalloc(sizeof(VMBUS_CHANNEL), GFP_ATOMIC); if (!channel) { return NULL; } - memset(channel, 0,sizeof(VMBUS_CHANNEL)); channel->InboundLock = SpinlockCreate(); if (!channel->InboundLock) { diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index 4ddaf6e..5ac9006 100644 --- a/drivers/staging/hv/Hv.c +++ b/drivers/staging/hv/Hv.c @@ -414,7 +414,7 @@ HvPostMessage( return -1; } - addr = (unsigned long)MemAllocAtomic(sizeof(struct alignedInput)); + addr = (unsigned long)kmalloc(sizeof(struct alignedInput), GFP_ATOMIC); if (!addr) { diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index 61132e4..3fb44cd 100644 --- a/drivers/staging/hv/NetVsc.c +++ b/drivers/staging/hv/NetVsc.c @@ -1480,7 +1480,7 @@ NetVscOnChannelCallback( } else if (ret == -2) // Handle large packet { - buffer = MemAllocAtomic(bytesRecvd); + buffer = kmalloc(bytesRecvd, GFP_ATOMIC); if (buffer == NULL) { // Try again next time around diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index 080594d..4ad40be 100644 --- a/drivers/staging/hv/Vmbus.c +++ b/drivers/staging/hv/Vmbus.c @@ -411,7 +411,7 @@ VmbusOnMsgDPC( } else { - copied = MemAllocAtomic(sizeof(HV_MESSAGE)); + copied = kmalloc(sizeof(HV_MESSAGE), GFP_ATOMIC); if (copied == NULL) { continue; diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h index 9ee98d8..586e888 100644 --- a/drivers/staging/hv/include/osd.h +++ b/drivers/staging/hv/include/osd.h @@ -121,7 +121,6 @@ extern void PageFree(void* page, unsigned int count); extern void* MemMapIO(unsigned long phys, unsigned long size); extern void MemUnmapIO(void* virt); -extern void* MemAllocAtomic(unsigned int size); extern void MemFree(void* buf); extern void MemoryFence(void); diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 02eb11d..7a90c37 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -189,11 +189,6 @@ void PageUnmapVirtualAddress(void* VirtAddr) kunmap_atomic(VirtAddr, KM_IRQ0); } -void* MemAllocAtomic(unsigned int size) -{ - return kmalloc(size, GFP_ATOMIC); -} - void MemFree(void* buf) { kfree(buf); |