Commit 4753ff6a authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: netvsc_drv: Move the dmi table declaration to earlier in the file

Move the dmi table declaration to earlier in the file.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 770cbb58
......@@ -438,6 +438,21 @@ static void netvsc_drv_exit(void)
vmbus_child_driver_unregister(&netvsc_drv.driver);
}
static const struct dmi_system_id __initconst
hv_netvsc_dmi_table[] __maybe_unused = {
{
.ident = "Hyper-V",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
},
},
{ },
};
MODULE_DEVICE_TABLE(dmi, hv_netvsc_dmi_table);
static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
{
struct hv_driver *drv = &netvsc_drv;
......@@ -454,20 +469,6 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
return ret;
}
static const struct dmi_system_id __initconst
hv_netvsc_dmi_table[] __maybe_unused = {
{
.ident = "Hyper-V",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
},
},
{ },
};
MODULE_DEVICE_TABLE(dmi, hv_netvsc_dmi_table);
static int __init netvsc_init(void)
{
pr_info("initializing....");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment