Commit 38e09e3b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6b1745ca
...@@ -302,16 +302,12 @@ static int adpt_detect(struct scsi_host_template* sht) ...@@ -302,16 +302,12 @@ static int adpt_detect(struct scsi_host_template* sht)
} }
/* static void adpt_release(adpt_hba *pHba)
* scsi_unregister will be called AFTER we return.
*/
static int adpt_release(struct Scsi_Host *host)
{ {
adpt_hba* pHba = (adpt_hba*) host->hostdata[0]; scsi_remove_host(pHba->host);
// adpt_i2o_quiesce_hba(pHba); // adpt_i2o_quiesce_hba(pHba);
adpt_i2o_delete_hba(pHba); adpt_i2o_delete_hba(pHba);
scsi_unregister(host); scsi_host_put(pHba->host);
return 0;
} }
...@@ -1087,8 +1083,6 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba) ...@@ -1087,8 +1083,6 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba)
mutex_lock(&adpt_configuration_lock); mutex_lock(&adpt_configuration_lock);
// scsi_unregister calls our adpt_release which
// does a quiese
if(pHba->host){ if(pHba->host){
free_irq(pHba->host->irq, pHba); free_irq(pHba->host->irq, pHba);
} }
...@@ -3595,11 +3589,9 @@ static void __exit adpt_exit(void) ...@@ -3595,11 +3589,9 @@ static void __exit adpt_exit(void)
{ {
adpt_hba *pHba, *next; adpt_hba *pHba, *next;
for (pHba = hba_chain; pHba; pHba = pHba->next)
scsi_remove_host(pHba->host);
for (pHba = hba_chain; pHba; pHba = next) { for (pHba = hba_chain; pHba; pHba = next) {
next = pHba->next; next = pHba->next;
adpt_release(pHba->host); adpt_release(pHba);
} }
} }
......
...@@ -32,7 +32,6 @@ static int adpt_detect(struct scsi_host_template * sht); ...@@ -32,7 +32,6 @@ static int adpt_detect(struct scsi_host_template * sht);
static int adpt_queue(struct Scsi_Host *h, struct scsi_cmnd * cmd); static int adpt_queue(struct Scsi_Host *h, struct scsi_cmnd * cmd);
static int adpt_abort(struct scsi_cmnd * cmd); static int adpt_abort(struct scsi_cmnd * cmd);
static int adpt_reset(struct scsi_cmnd* cmd); static int adpt_reset(struct scsi_cmnd* cmd);
static int adpt_release(struct Scsi_Host *host);
static int adpt_slave_configure(struct scsi_device *); static int adpt_slave_configure(struct scsi_device *);
static const char *adpt_info(struct Scsi_Host *pSHost); static const char *adpt_info(struct Scsi_Host *pSHost);
......
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