summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorK. Y. Srinivasan2011-09-13 19:59:38 +0200
committerGreg Kroah-Hartman2011-09-16 20:06:02 +0200
commit84946899bd50035c50d88da9da809aa25de60471 (patch)
tree98390106d7e0298842be9406ecc1f564b4daa3b6 /drivers
parentStaging: hv: vmbus: Introduce a utility function to match hv_vmbus_device_id (diff)
downloadkernel-qcow2-linux-84946899bd50035c50d88da9da809aa25de60471.tar.gz
kernel-qcow2-linux-84946899bd50035c50d88da9da809aa25de60471.tar.xz
kernel-qcow2-linux-84946899bd50035c50d88da9da809aa25de60471.zip
Staging: hv: vmbus: Change the signature of struct hv_driver probe function
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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/hv/hv_mouse.c3
-rw-r--r--drivers/staging/hv/hv_util.c3
-rw-r--r--drivers/staging/hv/hyperv.h2
-rw-r--r--drivers/staging/hv/netvsc_drv.c3
-rw-r--r--drivers/staging/hv/storvsc_drv.c3
-rw-r--r--drivers/staging/hv/vmbus_drv.c4
6 files changed, 12 insertions, 6 deletions
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index dbb04ee4e968..5ff8a035cd7f 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 603921771b94..d9460fdd9e4f 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 c24981198b1b..caa3a7ba8376 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 30b9c80e2009..d06cde29befe 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 b0c4e56304e2..fff1e5b936fc 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 77f4373ab893..2fccb1f974c0 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);