summaryrefslogtreecommitdiff
path: root/drivers/staging/hv/storvsc.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2011-08-27 11:31:04 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-29 11:01:02 -0700
commitdf977d6c90632b3868055862262529007019d4ef (patch)
tree4c62d3eb6ba09022246a3b78505d27c3022b9a85 /drivers/staging/hv/storvsc.c
parent1eaaddf93853b222a08ec37d4d8c4edc1085d312 (diff)
Staging: hv: storvsc: Cleanup alloc_stor_device()
Cleanup alloc_stor_device(), we can set the ref_count directly. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/storvsc.c')
-rw-r--r--drivers/staging/hv/storvsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 313a3f8cfaf..48bd8dae02e 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -42,7 +42,7 @@ static inline struct storvsc_device *alloc_stor_device(struct hv_device *device)
/* Set to 2 to allow both inbound and outbound traffics */
/* (ie get_out_stor_device() and get_in_stor_device()) to proceed. */
- atomic_cmpxchg(&stor_device->ref_count, 0, 2);
+ atomic_set(&stor_device->ref_count, 2);
init_waitqueue_head(&stor_device->waiting_to_drain);
stor_device->device = device;