Merge commit 'v2.6.37' into next
[firefly-linux-kernel-4.4.55.git] / drivers / staging / hv / netvsc.c
index be3825690a2746a9c41244f986531bf5b357ebc6..4c2632cb19e937359708c27408cc2e23c11544bb 100644 (file)
@@ -717,12 +717,9 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
        }
 
        /* Open the channel */
-       ret = Device->Driver->VmbusChannelInterface.Open(Device,
-                                               netDriver->RingBufferSize,
-                                               netDriver->RingBufferSize,
-                                               NULL, 0,
-                                               NetVscOnChannelCallback,
-                                               Device);
+       ret = vmbus_open(Device->channel, netDriver->RingBufferSize,
+                        netDriver->RingBufferSize, NULL, 0,
+                        NetVscOnChannelCallback, Device);
 
        if (ret != 0) {
                DPRINT_ERR(NETVSC, "unable to open channel: %d", ret);
@@ -738,7 +735,7 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
        if (ret != 0) {
                DPRINT_ERR(NETVSC, "unable to connect to NetVSP - %d", ret);
                ret = -1;
-               goto Close;
+               goto close;
        }
 
        DPRINT_INFO(NETVSC, "*** NetVSC channel handshake result - %d ***",
@@ -746,9 +743,9 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
 
        return ret;
 
-Close:
+close:
        /* Now, we can close the channel safely */
-       Device->Driver->VmbusChannelInterface.Close(Device);
+       vmbus_close(Device->channel);
 
 Cleanup:
 
@@ -810,7 +807,7 @@ static int NetVscOnDeviceRemove(struct hv_device *Device)
        DPRINT_INFO(NETVSC, "net device (%p) safe to remove", netDevice);
 
        /* Now, we can close the channel safely */
-       Device->Driver->VmbusChannelInterface.Close(Device);
+       vmbus_close(Device->channel);
 
        /* Release all resources */
        list_for_each_entry_safe(netvscPacket, pos,