summaryrefslogtreecommitdiff
path: root/drivers/staging/hv/vmbus_drv.c
diff options
context:
space:
mode:
authorBill Pemberton <wfp5p@virginia.edu>2009-07-29 21:00:12 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 19:01:53 (GMT)
commitf4888417083723c4f5cbfdf4895653279ffdc31e (patch)
tree4ee4e2bcda543e30f9e76925edaf796de8a922bb /drivers/staging/hv/vmbus_drv.c
parent7c369f405bc918f3245c7ee0b0ad6c6b6c750166 (diff)
downloadlinux-fsl-qoriq-f4888417083723c4f5cbfdf4895653279ffdc31e.tar.xz
Staging: hv: remove wrapper functions for atomic operations
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/vmbus_drv.c')
-rw-r--r--drivers/staging/hv/vmbus_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 375dde9..0e13d77 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -606,7 +606,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj, struct
int ret=0;
struct device_context *root_device_ctx = to_device_context(root_device_obj);
struct device_context *child_device_ctx = to_device_context(child_device_obj);
- static int device_num=0;
+ static atomic_t device_num = ATOMIC_INIT(0);
DPRINT_ENTER(VMBUS_DRV);
@@ -623,7 +623,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj, struct
}
/* Set the device bus id. Otherwise, device_register()will fail. */
- dev_set_name(&child_device_ctx->device, "vmbus_0_%d", InterlockedIncrement(&device_num));
+ dev_set_name(&child_device_ctx->device, "vmbus_0_%d", atomic_inc_return(&device_num));
/* The new device belongs to this bus */
child_device_ctx->device.bus = &g_vmbus_drv.bus; /* device->dev.bus; */