From: K. Y. Srinivasan Date: Sat, 27 Aug 2011 18:31:11 +0000 (-0700) Subject: Staging: hv: netvsc: Cleanup alloc_net_device() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=509ee3878b8f0f8908892579d679c123084f5ac5;p=openwrt%2Fstaging%2Fblogic.git Staging: hv: netvsc: Cleanup alloc_net_device() Cleanup alloc_net_device(); we can directly set the refcnt. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c index 75c6ed7b790a..772210268787 100644 --- a/drivers/staging/hv/netvsc.c +++ b/drivers/staging/hv/netvsc.c @@ -41,7 +41,7 @@ static struct netvsc_device *alloc_net_device(struct hv_device *device) return NULL; /* Set to 2 to allow both inbound and outbound traffic */ - atomic_cmpxchg(&net_device->refcnt, 0, 2); + atomic_set(&net_device->refcnt, 2); net_device->dev = device; device->ext = net_device;