Commit 70b0af4f authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: Remove probe_error from vm_device

In preparation for consolidating all device related state into
struct hv_device, move probe_error from vm_device to
hv_device.
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 a3c7fe9a
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
struct vm_device { struct vm_device {
struct hv_guid class_id; struct hv_guid class_id;
struct hv_guid device_id; struct hv_guid device_id;
int probe_error;
struct hv_device device_obj; struct hv_device device_obj;
struct device device; struct device device;
}; };
......
...@@ -120,6 +120,8 @@ struct hv_device { ...@@ -120,6 +120,8 @@ struct hv_device {
struct work_struct probe_failed_work_item; struct work_struct probe_failed_work_item;
int probe_error;
/* the device type id of this device */ /* the device type id of this device */
struct hv_guid dev_type; struct hv_guid dev_type;
......
...@@ -742,7 +742,7 @@ int vmbus_child_device_register(struct hv_device *root_device_obj, ...@@ -742,7 +742,7 @@ int vmbus_child_device_register(struct hv_device *root_device_obj,
ret = device_register(&child_device_ctx->device); ret = device_register(&child_device_ctx->device);
/* vmbus_probe() error does not get propergate to device_register(). */ /* vmbus_probe() error does not get propergate to device_register(). */
ret = child_device_ctx->probe_error; ret = child_device_ctx->device_obj.probe_error;
if (ret) if (ret)
DPRINT_ERR(VMBUS_DRV, "unable to register child device (%p)", DPRINT_ERR(VMBUS_DRV, "unable to register child device (%p)",
...@@ -908,7 +908,7 @@ static int vmbus_probe(struct device *child_device) ...@@ -908,7 +908,7 @@ static int vmbus_probe(struct device *child_device)
/* Let the specific open-source driver handles the probe if it can */ /* Let the specific open-source driver handles the probe if it can */
if (drv->driver.probe) { if (drv->driver.probe) {
ret = device_ctx->probe_error = ret = device_ctx->device_obj.probe_error =
drv->driver.probe(child_device); drv->driver.probe(child_device);
if (ret != 0) { if (ret != 0) {
DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s " DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment