From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@suse.de, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>
Subject: [PATCH 02/20] Staging: hv: vmbus: Change the signature of struct hv_driver probe function
Date: Tue, 13 Sep 2011 10:59:38 -0700 [thread overview]
Message-ID: <1315936796-20662-2-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1315936796-20662-1-git-send-email-kys@microsoft.com>
In preparation to leveraging the driver_data field in struct
hv_vmbus_device_id, change the signature of struct hv_driver probe function.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/staging/hv/hv_mouse.c | 3 ++-
drivers/staging/hv/hv_util.c | 3 ++-
drivers/staging/hv/hyperv.h | 2 +-
drivers/staging/hv/netvsc_drv.c | 3 ++-
drivers/staging/hv/storvsc_drv.c | 3 ++-
drivers/staging/hv/vmbus_drv.c | 4 +++-
6 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index dbb04ee..5ff8a03 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -823,7 +823,8 @@ static int mousevsc_on_device_remove(struct hv_device *device)
}
-static int mousevsc_probe(struct hv_device *dev)
+static int mousevsc_probe(struct hv_device *dev,
+ const struct hv_vmbus_device_id *dev_id)
{
int ret = 0;
diff --git a/drivers/staging/hv/hv_util.c b/drivers/staging/hv/hv_util.c
index 6039217..d9460fdd 100644
--- a/drivers/staging/hv/hv_util.c
+++ b/drivers/staging/hv/hv_util.c
@@ -239,7 +239,8 @@ static void heartbeat_onchannelcallback(void *context)
* The devices managed by the util driver don't need any additional
* setup.
*/
-static int util_probe(struct hv_device *dev)
+static int util_probe(struct hv_device *dev,
+ const struct hv_vmbus_device_id *dev_id)
{
return 0;
}
diff --git a/drivers/staging/hv/hyperv.h b/drivers/staging/hv/hyperv.h
index c249811..caa3a7b 100644
--- a/drivers/staging/hv/hyperv.h
+++ b/drivers/staging/hv/hyperv.h
@@ -810,7 +810,7 @@ struct hv_driver {
struct device_driver driver;
- int (*probe)(struct hv_device *);
+ int (*probe)(struct hv_device *, const struct hv_vmbus_device_id *);
int (*remove)(struct hv_device *);
void (*shutdown)(struct hv_device *);
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 30b9c80..d06cde2 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -329,7 +329,8 @@ static void netvsc_send_garp(struct work_struct *w)
}
-static int netvsc_probe(struct hv_device *dev)
+static int netvsc_probe(struct hv_device *dev,
+ const struct hv_vmbus_device_id *dev_id)
{
struct net_device *net = NULL;
struct net_device_context *net_device_ctx;
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index b0c4e56..fff1e5b 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -1380,7 +1380,8 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
* storvsc_probe - Add a new device for this driver
*/
-static int storvsc_probe(struct hv_device *device)
+static int storvsc_probe(struct hv_device *device,
+ const struct hv_vmbus_device_id *dev_id)
{
int ret;
struct Scsi_Host *host;
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 77f4373..2fccb1f 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -312,9 +312,11 @@ static int vmbus_probe(struct device *child_device)
struct hv_driver *drv =
drv_to_hv_drv(child_device->driver);
struct hv_device *dev = device_to_hv_device(child_device);
+ const struct hv_vmbus_device_id *dev_id;
+ dev_id = hv_vmbus_get_id(drv->id_table, dev->dev_type.b);
if (drv->probe) {
- ret = drv->probe(dev);
+ ret = drv->probe(dev, dev_id);
if (ret != 0)
pr_err("probe failed for device %s (%d)\n",
dev_name(child_device), ret);
--
1.7.4.1
next prev parent reply other threads:[~2011-09-13 17:39 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-13 17:59 [PATCH 0000/0020] Staging: hv: Driver cleanup K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 01/20] Staging: hv: vmbus: Introduce a utility function to match hv_vmbus_device_id K. Y. Srinivasan
2011-09-13 17:59 ` K. Y. Srinivasan [this message]
2011-09-13 17:59 ` [PATCH 03/20] Staging: hv: storvsc: Use the driver_data to identify ide K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 04/20] Staging: hv: vmbus: Introduce functions for setting and getting driver data K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 05/20] Staging: hv: util: Perform some service specific init/deinit in probe/remove K. Y. Srinivasan
2011-09-16 18:01 ` Greg KH
2011-09-13 17:59 ` [PATCH 06/20] Staging: hv: util: Properly handle util services in the util driver K. Y. Srinivasan
2011-09-15 20:08 ` Dan Carpenter
2011-09-15 20:24 ` KY Srinivasan
2011-09-16 18:03 ` Greg KH
2011-09-17 13:26 ` KY Srinivasan
2011-09-13 17:59 ` [PATCH 07/20] Staging: hv: vmbus: Get rid of hv_cb_utils[] and other unneeded code K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 08/20] Staging: hv: vmbus: Cleanup vmbus_remove() K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 09/20] Staging: hv: storvsc: Get rid of storvsc_dev_add() by inlining the code K. Y. Srinivasan
2011-09-13 18:39 ` Christoph Hellwig
2011-09-13 18:52 ` KY Srinivasan
2011-09-13 17:59 ` [PATCH 10/20] Staging: hv: storvsc: Get rid of alloc_stor_device() " K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 11/20] Staging: hv: storvsc: Get rid of some unnecessary state and definitions K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 12/20] Staging: hv: storvsc: Eliminate the usage of ext field in struct hv_device K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 13/20] Staging: hv: netvsc: Get rid of the usage of the " K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 14/20] Staging: hv: mousevsc: " K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 15/20] Staging: hv: vmbus: Get rid " K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 16/20] Staging: hv: vmbus: Do not allocate struct hv_device_info on the stack K. Y. Srinivasan
2011-09-13 18:41 ` Christoph Hellwig
2011-09-13 17:59 ` [PATCH 17/20] Staging: hv: vmbus: Get rid of the module dependency K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 18/20] Staging: hv: netvsc: Rename netDevice as net_device K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 19/20] Staging: hv: netvsc: Rename rndisDevice to rndis_device K. Y. Srinivasan
2011-09-13 17:59 ` [PATCH 20/20] Staging: hv: netvsc: Rename deviceInfo as device_info K. Y. Srinivasan
2011-09-13 18:10 ` Joe Perches
2011-09-13 18:15 ` KY Srinivasan
2011-09-16 18:07 ` [PATCH 0000/0020] Staging: hv: Driver cleanup Greg KH
2011-09-17 13:26 ` KY Srinivasan
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=1315936796-20662-2-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=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