diff options
| -rw-r--r-- | drivers/firewire/fw-sbp2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 49f7fd52ae87..846aad8666f5 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
| @@ -520,17 +520,15 @@ static int sbp2_agent_reset(struct fw_unit *unit) | |||
| 520 | static void sbp2_reconnect(struct work_struct *work); | 520 | static void sbp2_reconnect(struct work_struct *work); |
| 521 | static struct scsi_host_template scsi_driver_template; | 521 | static struct scsi_host_template scsi_driver_template; |
| 522 | 522 | ||
| 523 | static void | 523 | static void release_sbp2_device(struct kref *kref) |
| 524 | release_sbp2_device(struct kref *kref) | ||
| 525 | { | 524 | { |
| 526 | struct sbp2_device *sd = container_of(kref, struct sbp2_device, kref); | 525 | struct sbp2_device *sd = container_of(kref, struct sbp2_device, kref); |
| 527 | struct Scsi_Host *host = | 526 | struct Scsi_Host *host = |
| 528 | container_of((void *)sd, struct Scsi_Host, hostdata[0]); | 527 | container_of((void *)sd, struct Scsi_Host, hostdata[0]); |
| 529 | 528 | ||
| 529 | scsi_remove_host(host); | ||
| 530 | sbp2_send_management_orb(sd->unit, sd->node_id, sd->generation, | 530 | sbp2_send_management_orb(sd->unit, sd->node_id, sd->generation, |
| 531 | SBP2_LOGOUT_REQUEST, sd->login_id, NULL); | 531 | SBP2_LOGOUT_REQUEST, sd->login_id, NULL); |
| 532 | |||
| 533 | scsi_remove_host(host); | ||
| 534 | fw_core_remove_address_handler(&sd->address_handler); | 532 | fw_core_remove_address_handler(&sd->address_handler); |
| 535 | fw_notify("removed sbp2 unit %s\n", sd->unit->device.bus_id); | 533 | fw_notify("removed sbp2 unit %s\n", sd->unit->device.bus_id); |
| 536 | put_device(&sd->unit->device); | 534 | put_device(&sd->unit->device); |
