Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249350
b: refs/heads/master
c: b14a7b3
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 3, 2011
1 parent aab8356 commit 58ad99c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 703027d0e4b329dc27fd152934a5ddb3d9f2ddab
refs/heads/master: b14a7b3014b1151597d526f2e24f291ebc3a4f5b
4 changes: 0 additions & 4 deletions trunk/drivers/staging/hv/vmbus_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ struct hv_driver {
struct hv_device {
char name[64];

struct work_struct probe_failed_work_item;

int probe_error;

/* the device type id of this device */
struct hv_guid dev_type;

Expand Down
31 changes: 2 additions & 29 deletions trunk/drivers/staging/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,27 +313,6 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
return match;
}


/*
* vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
*
* We need a callback because we cannot invoked device_unregister() inside
* vmbus_probe() since vmbus_probe() may be invoked inside device_register()
* i.e. we cannot call device_unregister() inside device_register()
*/
static void vmbus_probe_failed_cb(struct work_struct *context)
{
struct hv_device *device_ctx = (struct hv_device *)context;

/*
* Kick off the process of unregistering the device.
* This will call vmbus_remove() and eventually vmbus_device_release()
*/
device_unregister(&device_ctx->device);

/* put_device(&device_ctx->device); */
}

/*
* vmbus_probe - Add the new vmbus's child device
*/
Expand All @@ -342,20 +321,14 @@ static int vmbus_probe(struct device *child_device)
int ret = 0;
struct hv_driver *drv =
drv_to_hv_drv(child_device->driver);
struct hv_device *dev = device_to_hv_device(child_device);

/* Let the specific open-source driver handles the probe if it can */
if (drv->driver.probe) {
ret = dev->probe_error =
drv->driver.probe(child_device);
if (ret != 0) {
ret = drv->driver.probe(child_device);
if (ret != 0)
pr_err("probe failed for device %s (%d)\n",
dev_name(child_device), ret);

INIT_WORK(&dev->probe_failed_work_item,
vmbus_probe_failed_cb);
schedule_work(&dev->probe_failed_work_item);
}
} else {
pr_err("probe not set for driver %s\n",
dev_name(child_device));
Expand Down

0 comments on commit 58ad99c

Please sign in to comment.