diff options
author | Christoph Hellwig <hch@lst.de> | 2018-03-14 12:48:23 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-03-15 00:25:37 -0400 |
commit | 38e09e3bb056b90d70308fe1e3db387ef976ce6e (patch) | |
tree | 091239c7b46390b73c53b2f1aaacd86664713669 /drivers/scsi/dpt_i2o.c | |
parent | 6b1745caa14ae0afccf1c6ee4c814fd8d5df3dcd (diff) | |
download | linux-next-38e09e3bb056b90d70308fe1e3db387ef976ce6e.tar.gz |
scsi: dpt_i2o: stop using scsi_unregister
dpt_i2o doesn't use scsi_register, so it should not use scsi_unregister
either. Also refactor the module exit path to make a little more sense.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index fd172b0890d3..3c667b23a801 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -302,16 +302,12 @@ rebuild_sys_tab: } -/* - * scsi_unregister will be called AFTER we return. - */ -static int adpt_release(struct Scsi_Host *host) +static void adpt_release(adpt_hba *pHba) { - adpt_hba* pHba = (adpt_hba*) host->hostdata[0]; + scsi_remove_host(pHba->host); // adpt_i2o_quiesce_hba(pHba); adpt_i2o_delete_hba(pHba); - scsi_unregister(host); - return 0; + scsi_host_put(pHba->host); } @@ -1087,8 +1083,6 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba) mutex_lock(&adpt_configuration_lock); - // scsi_unregister calls our adpt_release which - // does a quiese if(pHba->host){ free_irq(pHba->host->irq, pHba); } @@ -3595,11 +3589,9 @@ static void __exit adpt_exit(void) { adpt_hba *pHba, *next; - for (pHba = hba_chain; pHba; pHba = pHba->next) - scsi_remove_host(pHba->host); for (pHba = hba_chain; pHba; pHba = next) { next = pHba->next; - adpt_release(pHba->host); + adpt_release(pHba); } } |