[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1314290965-2698-20-git-send-email-kys@microsoft.com>
Date: Thu, 25 Aug 2011 09:48:46 -0700
From: "K. Y. Srinivasan" <kys@...rosoft.com>
To: gregkh@...e.de, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, virtualization@...ts.osdl.org
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>
Subject: [PATCH 20/59] Staging: hv: netvsc: Initialize the driver name directly
Initialize the driver name directly in netvsc_drv.c and do the necessary
adjustments.
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
---
drivers/staging/hv/netvsc.c | 5 -----
drivers/staging/hv/netvsc_drv.c | 4 +++-
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/hv/netvsc.c b/drivers/staging/hv/netvsc.c
index 6f4541b..d085018 100644
--- a/drivers/staging/hv/netvsc.c
+++ b/drivers/staging/hv/netvsc.c
@@ -32,9 +32,6 @@
#include "hyperv_net.h"
-/* Globals */
-static const char *driver_name = "netvsc";
-
static struct netvsc_device *alloc_net_device(struct hv_device *device)
{
struct netvsc_device *net_device;
@@ -999,7 +996,5 @@ cleanup:
int netvsc_initialize(struct hv_driver *drv)
{
- drv->name = driver_name;
-
return 0;
}
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index d6c6180..61de6f2 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -41,6 +41,8 @@
#include "hyperv.h"
#include "hyperv_net.h"
+static const char *driver_name = "netvsc";
+
struct net_device_context {
/* point back to our device context */
struct hv_device *device_ctx;
@@ -449,7 +451,7 @@ static int __init netvsc_drv_init(void)
/* Callback to client driver to complete the initialization */
netvsc_initialize(drv);
- drv->driver.name = drv->name;
+ drv->driver.name = driver_name;
/* The driver belongs to vmbus */
ret = vmbus_child_driver_register(&drv->driver);
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists