From: "K. Y. Srinivasan" <kys@microsoft.com>
To: kys@microsoft.com, gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
Cc: Haiyang Zhang <haiyangz@microsoft.com>,
Abhishek Kane <v-abkane@microsoft.com>
Subject: [PATCH 05/16] Staging: hv: Change the signature for vmbus_child_driver_register
Date: Mon, 7 Mar 2011 13:23:43 -0800 [thread overview]
Message-ID: <1299533023-22609-1-git-send-email-kys@microsoft.com> (raw)
In preparation for moving the element driver from the
struct driver_context to struct hv_driver, change the
signature for the function vmbus_child_driver_register()
to take a pointer to struct device_driver.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/blkvsc_drv.c | 2 +-
drivers/staging/hv/hv_mouse.c | 2 +-
drivers/staging/hv/netvsc_drv.c | 2 +-
drivers/staging/hv/storvsc_drv.c | 2 +-
drivers/staging/hv/vmbus.h | 2 +-
drivers/staging/hv/vmbus_drv.c | 11 +++++------
6 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 9ccd5dc..d5e1881 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -191,7 +191,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
drv_ctx->driver.shutdown = blkvsc_shutdown;
/* The driver belongs to vmbus */
- ret = vmbus_child_driver_register(drv_ctx);
+ ret = vmbus_child_driver_register(&drv_ctx->driver);
return ret;
}
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 6e2a937..d2290f8 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -1025,7 +1025,7 @@ static int __init mousevsc_init(void)
drv_ctx->driver.remove = mousevsc_remove;
/* The driver belongs to vmbus */
- vmbus_child_driver_register(drv_ctx);
+ vmbus_child_driver_register(&drv_ctx->driver);
return 0;
}
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index e2013b5..a50a9a6 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -515,7 +515,7 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
drv_ctx->driver.remove = netvsc_remove;
/* The driver belongs to vmbus */
- ret = vmbus_child_driver_register(drv_ctx);
+ ret = vmbus_child_driver_register(&drv_ctx->driver);
return ret;
}
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 3855271..8ab8df5 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -168,7 +168,7 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
drv_ctx->driver.remove = storvsc_remove;
/* The driver belongs to vmbus */
- ret = vmbus_child_driver_register(drv_ctx);
+ ret = vmbus_child_driver_register(&drv_ctx->driver);
return ret;
}
diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h
index 8bcfb40..2295fe2 100644
--- a/drivers/staging/hv/vmbus.h
+++ b/drivers/staging/hv/vmbus.h
@@ -61,7 +61,7 @@ static inline struct driver_context *driver_to_driver_context(struct device_driv
/* Vmbus interface */
-int vmbus_child_driver_register(struct driver_context *driver_ctx);
+int vmbus_child_driver_register(struct device_driver *drv);
void vmbus_child_driver_unregister(struct driver_context *driver_ctx);
extern struct completion hv_channel_ready;
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 6ef5bee..685376b 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -617,9 +617,8 @@ static void vmbus_bus_exit(void)
/**
* vmbus_child_driver_register() - Register a vmbus's child driver
- * @driver_ctx: Pointer to driver structure you want to register
+ * @drv: Pointer to driver structure you want to register
*
- * @driver_ctx is of type &struct driver_context
*
* Registers the given driver with Linux through the 'driver_register()' call
* And sets up the hyper-v vmbus handling for this driver.
@@ -627,17 +626,17 @@ static void vmbus_bus_exit(void)
*
* Mainly used by Hyper-V drivers.
*/
-int vmbus_child_driver_register(struct driver_context *driver_ctx)
+int vmbus_child_driver_register(struct device_driver *drv)
{
int ret;
DPRINT_INFO(VMBUS_DRV, "child driver (%p) registering - name %s",
- driver_ctx, driver_ctx->driver.name);
+ drv, drv->name);
/* The child driver on this vmbus */
- driver_ctx->driver.bus = &vmbus_drv.bus;
+ drv->bus = &vmbus_drv.bus;
- ret = driver_register(&driver_ctx->driver);
+ ret = driver_register(drv);
vmbus_request_offers();
--
1.5.5.6
reply other threads:[~2011-03-07 21:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1299533023-22609-1-git-send-email-kys@microsoft.com \
--to=kys@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=v-abkane@microsoft.com \
--cc=virtualization@lists.osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox