diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2009-07-29 17:00:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:53 -0700 |
commit | f4888417083723c4f5cbfdf4895653279ffdc31e (patch) | |
tree | 4ee4e2bcda543e30f9e76925edaf796de8a922bb /drivers/staging/hv/RndisFilter.c | |
parent | 7c369f405bc918f3245c7ee0b0ad6c6b6c750166 (diff) |
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/RndisFilter.c')
-rw-r--r-- | drivers/staging/hv/RndisFilter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index 5b992dfdb0f..98d82f92c02 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c @@ -50,7 +50,7 @@ typedef struct _RNDIS_DEVICE { RNDIS_DEVICE_STATE State; u32 LinkStatus; - u32 NewRequestId; + atomic_t NewRequestId; spinlock_t request_lock; LIST_ENTRY RequestList; @@ -255,7 +255,7 @@ static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, u32 MessageTy /* Set the request id. This field is always after the rndis header for request/response packet types so */ /* we just used the SetRequest as a template */ set = &rndisMessage->Message.SetRequest; - set->RequestId = InterlockedIncrement((int*)&Device->NewRequestId); + set->RequestId = atomic_inc_return(&Device->NewRequestId); /* Add to the request list */ spin_lock_irqsave(&Device->request_lock, flags); @@ -863,7 +863,7 @@ RndisFilterHaltDevice( /* Setup the rndis set */ halt = &request->RequestMessage.Message.HaltRequest; - halt->RequestId = InterlockedIncrement((int*)&Device->NewRequestId); + halt->RequestId = atomic_inc_return(&Device->NewRequestId); /* Ignore return since this msg is optional. */ RndisFilterSendRequest(Device, request); |