summaryrefslogtreecommitdiff
path: root/drivers/staging/hv
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2011-09-29 11:54:54 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-04 10:39:34 -0700
commitbdbbdb2d63fe340935ec6521da62fe9e73d8dc15 (patch)
treeb34df01dd0bfb3a5563f0515029453ec47b1b907 /drivers/staging/hv
parentc5b71fc71fc7cdee68614d37826ed46db9be2006 (diff)
Staging: hv: mousevsc: Cleanup alloc_input_device()
Cleanup alloc_input_device(); you can directly set the reference count. 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')
-rw-r--r--drivers/staging/hv/hv_mouse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 092c0ff0f0f5..38e31ae73a17 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -186,7 +186,7 @@ static struct mousevsc_dev *alloc_input_device(struct hv_device *device)
* Set to 2 to allow both inbound and outbound traffics
* (ie get_input_device() and must_get_input_device()) to proceed.
*/
- atomic_cmpxchg(&input_dev->ref_count, 0, 2);
+ atomic_set(&input_dev->ref_count, 2);
input_dev->device = device;
hv_set_drvdata(device, input_dev);