Drivers: hv: Implement the file copy service
[firefly-linux-kernel-4.4.55.git] / drivers / hv / hv_util.c
index 62dfd246b94838e622c02bd125650a79a21c3f32..dd761806f0e82659bd230699e859f622b9be3c61 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/reboot.h>
 #include <linux/hyperv.h>
 
+#include "hyperv_vmbus.h"
 
 #define SD_MAJOR       3
 #define SD_MINOR       0
@@ -82,6 +83,12 @@ static struct hv_util_service util_vss = {
        .util_deinit = hv_vss_deinit,
 };
 
+static struct hv_util_service util_fcopy = {
+       .util_cb = hv_fcopy_onchannelcallback,
+       .util_init = hv_fcopy_init,
+       .util_deinit = hv_fcopy_deinit,
+};
+
 static void perform_shutdown(struct work_struct *dummy)
 {
        orderly_poweroff(true);
@@ -401,6 +408,10 @@ static const struct hv_vmbus_device_id id_table[] = {
        { HV_VSS_GUID,
          .driver_data = (unsigned long)&util_vss
        },
+       /* File copy GUID */
+       { HV_FCOPY_GUID,
+         .driver_data = (unsigned long)&util_fcopy
+       },
        { },
 };