]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: hv: vmbus: Change the signature of struct hv_driver probe function
authorK. Y. Srinivasan <kys@microsoft.com>
Tue, 13 Sep 2011 17:59:38 +0000 (10:59 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Sep 2011 18:06:02 +0000 (20:06 +0200)
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>
drivers/staging/hv/hv_mouse.c
drivers/staging/hv/hv_util.c
drivers/staging/hv/hyperv.h
drivers/staging/hv/netvsc_drv.c
drivers/staging/hv/storvsc_drv.c
drivers/staging/hv/vmbus_drv.c

index dbb04ee4e968f4d68e54b05ed42a3def9f598720..5ff8a035cd7f62a31b24d02bad006d210d2784c3 100644 (file)
@@ -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;
 
index 603921771b94b6591c49628dacc6721e2b577549..d9460fdd9e4f6a9479e7ee623780a9a077c1febc 100644 (file)
@@ -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;
 }
index c24981198b1b55257f500f3332fd9dba87e12cb4..caa3a7ba83764b998fa95d9cb337e0f5e2f8323a 100644 (file)
@@ -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 *);
 
index 30b9c80e2009db8bbe2cd8a833ec0818b4d4b61d..d06cde29befe27d12ca0590e08e9ab0e177e2f95 100644 (file)
@@ -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;
index b0c4e56304e23ac158d657c212c244f57c0e3e38..fff1e5b936fc015750c38631034fa6ac3fd2491e 100644 (file)
@@ -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;
index 77f4373ab8930ad5527e2289d7512920af598397..2fccb1f974c088b0b03ee321b21bbc82704e1303 100644 (file)
@@ -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);