mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
[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>
This commit is contained in:
parent
6fdea8dbbe
commit
dffe807cdb
2 changed files with 5 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -1321,7 +1321,7 @@ struct ncr_device {
|
|||
};
|
||||
|
||||
extern struct Scsi_Host *ncr_attach(struct scsi_host_template *tpnt, int unit, struct ncr_device *device);
|
||||
extern int ncr53c8xx_release(struct Scsi_Host *host);
|
||||
extern void ncr53c8xx_release(struct Scsi_Host *host);
|
||||
irqreturn_t ncr53c8xx_intr(int irq, void *dev_id);
|
||||
extern int ncr53c8xx_init(void);
|
||||
extern void ncr53c8xx_exit(void);
|
||||
|
|
Loading…
Reference in a new issue