Skip to content

Commit

Permalink
Staging: hv: netvsc_drv: Move the dmi table declaration to earlier in…
Browse files Browse the repository at this point in the history
… the file

Move the dmi table declaration to earlier in the file.

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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 17, 2011
1 parent 770cbb5 commit 4753ff6
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions drivers/staging/hv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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....");
Expand Down

0 comments on commit 4753ff6

Please sign in to comment.