提交 509ee387 编写于 作者: K K. Y. Srinivasan 提交者: Greg Kroah-Hartman

Staging: hv: netvsc: Cleanup alloc_net_device()

Cleanup alloc_net_device(); we can directly set the refcnt.
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 356c4657
...@@ -41,7 +41,7 @@ static struct netvsc_device *alloc_net_device(struct hv_device *device) ...@@ -41,7 +41,7 @@ static struct netvsc_device *alloc_net_device(struct hv_device *device)
return NULL; return NULL;
/* Set to 2 to allow both inbound and outbound traffic */ /* 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; net_device->dev = device;
device->ext = net_device; device->ext = net_device;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册