Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 904777c7 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Staging: hv: Use generic device_driver probe function



In preparation for moving all the state from struct driver_context
to struct hv_driver, eliminate the probe() function from
struct driver_context and use generic device_driver probe
function.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d542f180
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
	memcpy(&drv_ctx->class_id, &storvsc_drv_obj->base.dev_type,
	       sizeof(struct hv_guid));

	drv_ctx->probe = blkvsc_probe;
	drv_ctx->driver.probe = blkvsc_probe;
	drv_ctx->remove = blkvsc_remove;
	drv_ctx->shutdown = blkvsc_shutdown;

+1 −1
Original line number Diff line number Diff line
@@ -1021,7 +1021,7 @@ static int __init mousevsc_init(void)
	memcpy(&drv_ctx->class_id, &input_drv_obj->Base.dev_type,
	       sizeof(struct hv_guid));

	drv_ctx->probe = mousevsc_probe;
	drv_ctx->driver.probe = mousevsc_probe;
	drv_ctx->remove = mousevsc_remove;

	/* The driver belongs to vmbus */
+1 −1
Original line number Diff line number Diff line
@@ -511,7 +511,7 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
	memcpy(&drv_ctx->class_id, &net_drv_obj->base.dev_type,
	       sizeof(struct hv_guid));

	drv_ctx->probe = netvsc_probe;
	drv_ctx->driver.probe = netvsc_probe;
	drv_ctx->remove = netvsc_remove;

	/* The driver belongs to vmbus */
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
	memcpy(&drv_ctx->class_id, &storvsc_drv_obj->base.dev_type,
	       sizeof(struct hv_guid));

	drv_ctx->probe = storvsc_probe;
	drv_ctx->driver.probe = storvsc_probe;
	drv_ctx->remove = storvsc_remove;

	/* The driver belongs to vmbus */
+3 −2
Original line number Diff line number Diff line
@@ -919,8 +919,9 @@ static int vmbus_probe(struct device *child_device)
			device_to_vm_device(child_device);

	/* Let the specific open-source driver handles the probe if it can */
	if (driver_ctx->probe) {
		ret = device_ctx->probe_error = driver_ctx->probe(child_device);
	if (driver_ctx->driver.probe) {
		ret = device_ctx->probe_error =
		driver_ctx->driver.probe(child_device);
		if (ret != 0) {
			DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s "
				   "(%p) on driver %s (%d)...",