mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
Staging: hv: Change the signature for vmbus_child_driver_register
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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b9bd2f9b35
commit
c643269d67
6 changed files with 10 additions and 11 deletions
|
@ -191,7 +191,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
|
||||||
drv_ctx->driver.shutdown = blkvsc_shutdown;
|
drv_ctx->driver.shutdown = blkvsc_shutdown;
|
||||||
|
|
||||||
/* The driver belongs to vmbus */
|
/* The driver belongs to vmbus */
|
||||||
ret = vmbus_child_driver_register(drv_ctx);
|
ret = vmbus_child_driver_register(&drv_ctx->driver);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ static int __init mousevsc_init(void)
|
||||||
drv_ctx->driver.remove = mousevsc_remove;
|
drv_ctx->driver.remove = mousevsc_remove;
|
||||||
|
|
||||||
/* The driver belongs to vmbus */
|
/* The driver belongs to vmbus */
|
||||||
vmbus_child_driver_register(drv_ctx);
|
vmbus_child_driver_register(&drv_ctx->driver);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -515,7 +515,7 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
|
||||||
drv_ctx->driver.remove = netvsc_remove;
|
drv_ctx->driver.remove = netvsc_remove;
|
||||||
|
|
||||||
/* The driver belongs to vmbus */
|
/* The driver belongs to vmbus */
|
||||||
ret = vmbus_child_driver_register(drv_ctx);
|
ret = vmbus_child_driver_register(&drv_ctx->driver);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
|
||||||
drv_ctx->driver.remove = storvsc_remove;
|
drv_ctx->driver.remove = storvsc_remove;
|
||||||
|
|
||||||
/* The driver belongs to vmbus */
|
/* The driver belongs to vmbus */
|
||||||
ret = vmbus_child_driver_register(drv_ctx);
|
ret = vmbus_child_driver_register(&drv_ctx->driver);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ static inline struct driver_context *driver_to_driver_context(struct device_driv
|
||||||
|
|
||||||
|
|
||||||
/* Vmbus interface */
|
/* 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);
|
void vmbus_child_driver_unregister(struct driver_context *driver_ctx);
|
||||||
|
|
||||||
extern struct completion hv_channel_ready;
|
extern struct completion hv_channel_ready;
|
||||||
|
|
|
@ -617,9 +617,8 @@ static void vmbus_bus_exit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vmbus_child_driver_register() - Register a vmbus's child driver
|
* 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
|
* Registers the given driver with Linux through the 'driver_register()' call
|
||||||
* And sets up the hyper-v vmbus handling for this driver.
|
* 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.
|
* 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;
|
int ret;
|
||||||
|
|
||||||
DPRINT_INFO(VMBUS_DRV, "child driver (%p) registering - name %s",
|
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 */
|
/* 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();
|
vmbus_request_offers();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue