Staging: hv: netvsc: Use the newly introduced vmbus ID in netvsc driver
authorK. Y. Srinivasan <kys@microsoft.com>
Thu, 25 Aug 2011 16:48:34 +0000 (09:48 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 25 Aug 2011 18:31:10 +0000 (11:31 -0700)
Use the newly introduced vmbus ID in netvsc driver. Also, do the associated
cleanup.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/netvsc.c
drivers/staging/hv/netvsc_drv.c

index 1506b5346676c1353bf0412e3b10def5e71d5b9f..6f4541bcef890d687d1032df96d89c18e6bb311e 100644 (file)
 /* Globals */
 static const char *driver_name = "netvsc";
 
-/* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */
-static const uuid_le netvsc_device_type = {
-       .b = {
-               0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46,
-               0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E
-       }
-};
-
-
 static struct netvsc_device *alloc_net_device(struct hv_device *device)
 {
        struct netvsc_device *net_device;
@@ -1009,7 +1000,6 @@ int netvsc_initialize(struct hv_driver *drv)
 {
 
        drv->name = driver_name;
-       memcpy(&drv->dev_type, &netvsc_device_type, sizeof(uuid_le));
 
        return 0;
 }
index 61989f0d9f0d34faf68d25d637aea35b0392fef9..2e25c957cfd006efbdbf32cae8f196073b75ea97 100644 (file)
@@ -413,8 +413,24 @@ static int netvsc_remove(struct hv_device *dev)
        return 0;
 }
 
+static const struct hv_vmbus_device_id id_table[] = {
+       {
+               /* Network guid */
+               .guid = {
+                       0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46,
+                       0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E
+               }
+       },
+       {
+               .guid = { }
+       },
+};
+
+MODULE_DEVICE_TABLE(vmbus, id_table);
+
 /* The one and only one */
 static struct  hv_driver netvsc_drv = {
+       .id_table = id_table,
        .probe = netvsc_probe,
        .remove = netvsc_remove,
 };