Staging: hv: netvsc_drv: Move the dmi_check code to netvsc_drv_init()
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 13 May 2011 02:35:15 +0000 (19:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 19:28:57 +0000 (12:28 -0700)
In preparation to eliminating netvsc_init(), move the dmi_check code
to netvsc_drv_init().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/netvsc_drv.c

index 2aa273380f1059d374f50fc17b5d8e7098a80cdc..5217021d6e1fffeb22166d7a20030ec9ad1565e5 100644 (file)
@@ -458,6 +458,12 @@ static int netvsc_drv_init(void)
        struct hv_driver *drv = &netvsc_drv;
        int ret;
 
+       pr_info("initializing....");
+
+       if (!dmi_check_system(hv_netvsc_dmi_table))
+               return -ENODEV;
+
+
        /* Callback to client driver to complete the initialization */
        netvsc_initialize(drv);
 
@@ -471,11 +477,6 @@ static int netvsc_drv_init(void)
 
 static int __init netvsc_init(void)
 {
-       pr_info("initializing....");
-
-       if (!dmi_check_system(hv_netvsc_dmi_table))
-               return -ENODEV;
-
        return netvsc_drv_init();
 }