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>
This commit is contained in:
parent
3037a7b61f
commit
84946899bd
|
@ -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;
|
int ret = 0;
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,8 @@ static void heartbeat_onchannelcallback(void *context)
|
||||||
* The devices managed by the util driver don't need any additional
|
* The devices managed by the util driver don't need any additional
|
||||||
* setup.
|
* 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -810,7 +810,7 @@ struct hv_driver {
|
||||||
|
|
||||||
struct device_driver 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 *);
|
int (*remove)(struct hv_device *);
|
||||||
void (*shutdown)(struct hv_device *);
|
void (*shutdown)(struct hv_device *);
|
||||||
|
|
||||||
|
|
|
@ -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 *net = NULL;
|
||||||
struct net_device_context *net_device_ctx;
|
struct net_device_context *net_device_ctx;
|
||||||
|
|
|
@ -1380,7 +1380,8 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
|
||||||
* storvsc_probe - Add a new device for this driver
|
* 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;
|
int ret;
|
||||||
struct Scsi_Host *host;
|
struct Scsi_Host *host;
|
||||||
|
|
|
@ -312,9 +312,11 @@ static int vmbus_probe(struct device *child_device)
|
||||||
struct hv_driver *drv =
|
struct hv_driver *drv =
|
||||||
drv_to_hv_drv(child_device->driver);
|
drv_to_hv_drv(child_device->driver);
|
||||||
struct hv_device *dev = device_to_hv_device(child_device);
|
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) {
|
if (drv->probe) {
|
||||||
ret = drv->probe(dev);
|
ret = drv->probe(dev, dev_id);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
pr_err("probe failed for device %s (%d)\n",
|
pr_err("probe failed for device %s (%d)\n",
|
||||||
dev_name(child_device), ret);
|
dev_name(child_device), ret);
|
||||||
|
|
Loading…
Reference in New Issue