Skip to content

Commit

Permalink
Staging: hv: storvsc: Cleanup alloc_stor_device()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Aug 29, 2011
1 parent 1eaaddf commit df977d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/hv/storvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit df977d6

Please sign in to comment.