diff options
author | Matthew Wilcox <matthew@wil.cx> | 2007-08-15 12:56:56 -0600 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:51:18 -0400 |
commit | dffe807cdbc6d2409b9bcc87a9517bb7c0d25b65 (patch) | |
tree | 9d79c515ab15086a63146cfdd8dd271758b86118 /drivers/scsi/ncr53c8xx.c | |
parent | 6fdea8dbbe4fc021afb601ef5339d5c5825c5cb6 (diff) | |
download | op-kernel-dev-dffe807cdbc6d2409b9bcc87a9517bb7c0d25b65.zip op-kernel-dev-dffe807cdbc6d2409b9bcc87a9517bb7c0d25b65.tar.gz |
[SCSI] ncr53c8xx: Call scsi_host_put in release
Since ncr53c8xx_attach() calls scsi_host_put(), make ncr53c8xx_release()
call scsi_host_put() too, for symmetry. Both callers already expect
it to put the host for them, so that works out nicely. While the zalon
driver does 'use' the host pointer afterwards, it only compares it for
equality and doesn't dereference it, so that's safe.
While I'm at it, get rid of pointless checks for NULL, use shost_priv()
and change ncr53c8xx_release to return void.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ncr53c8xx.c')
-rw-r--r-- | drivers/scsi/ncr53c8xx.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 030ba49..91fa66c 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c @@ -8528,18 +8528,15 @@ struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt, } -int ncr53c8xx_release(struct Scsi_Host *host) +void ncr53c8xx_release(struct Scsi_Host *host) { - struct host_data *host_data; + struct host_data *host_data = shost_priv(host); #ifdef DEBUG_NCR53C8XX printk("ncr53c8xx: release\n"); #endif - if (!host) - return 1; - host_data = (struct host_data *)host->hostdata; - if (host_data && host_data->ncb) + if (host_data->ncb) ncr_detach(host_data->ncb); - return 1; + scsi_host_put(host); } static void ncr53c8xx_set_period(struct scsi_target *starget, int period) |