diff options
Diffstat (limited to 'drivers/scsi/scsi_transport_sas.c')
-rw-r--r-- | drivers/scsi/scsi_transport_sas.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index ff724bbe661..1d145d2f9a3 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -628,17 +628,16 @@ sas_rphy_delete(struct sas_rphy *rphy) | |||
628 | struct Scsi_Host *shost = dev_to_shost(parent->dev.parent); | 628 | struct Scsi_Host *shost = dev_to_shost(parent->dev.parent); |
629 | struct sas_host_attrs *sas_host = to_sas_host_attrs(shost); | 629 | struct sas_host_attrs *sas_host = to_sas_host_attrs(shost); |
630 | 630 | ||
631 | transport_destroy_device(&rphy->dev); | 631 | scsi_remove_target(dev); |
632 | 632 | ||
633 | scsi_remove_target(&rphy->dev); | 633 | transport_remove_device(dev); |
634 | device_del(dev); | ||
635 | transport_destroy_device(dev); | ||
634 | 636 | ||
635 | spin_lock(&sas_host->lock); | 637 | spin_lock(&sas_host->lock); |
636 | list_del(&rphy->list); | 638 | list_del(&rphy->list); |
637 | spin_unlock(&sas_host->lock); | 639 | spin_unlock(&sas_host->lock); |
638 | 640 | ||
639 | transport_remove_device(dev); | ||
640 | device_del(dev); | ||
641 | transport_destroy_device(dev); | ||
642 | put_device(&parent->dev); | 641 | put_device(&parent->dev); |
643 | } | 642 | } |
644 | EXPORT_SYMBOL(sas_rphy_delete); | 643 | EXPORT_SYMBOL(sas_rphy_delete); |