diff options
author | Stephen Hemminger <sthemmin@microsoft.com> | 2016-08-23 12:17:51 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-23 12:05:37 -0700 |
commit | fd612602d6a7919982779fda914bd521e5778593 (patch) | |
tree | b632b70b74d4623a3bb72acbfce5fc263748f4e8 /drivers/net/hyperv | |
parent | e08f3ea586d4145e36c77f0dd1602374b5d7e928 (diff) | |
download | linux-fd612602d6a7919982779fda914bd521e5778593.tar.gz linux-fd612602d6a7919982779fda914bd521e5778593.tar.bz2 linux-fd612602d6a7919982779fda914bd521e5778593.zip |
hv_netvsc: init completion during alloc
Move initialization to allocate where other fields are initialized.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/netvsc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 2ece27ad8429..27eb507d64f9 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -164,6 +164,7 @@ static struct netvsc_device *alloc_net_device(void) atomic_set(&net_device->open_cnt, 0); net_device->max_pkt = RNDIS_MAX_PKT_DEFAULT; net_device->pkt_align = RNDIS_PKT_ALIGN_DEFAULT; + init_completion(&net_device->channel_init_wait); return net_device; } @@ -1442,9 +1443,6 @@ int netvsc_device_add(struct hv_device *device, void *additional_info) net_device->ring_size = ring_size; - /* Initialize the NetVSC channel extension */ - init_completion(&net_device->channel_init_wait); - set_per_channel_state(device->channel, net_device->cb_buffer); /* Open the channel */ |