/* Returns: 0 if scan is not done / 1 if scan is done  */
static int ibmvfc_scan_finished(struct Scsi_Host *shost, unsigned long time)
/* Returns: 0 if scan is not done / 1 if scan is done  */
static int ibmvfc_scan_finished(struct Scsi_Host *shost, unsigned long time)
{
	unsigned long flags;
	struct ibmvfc_host *vhost = shost_priv(shost);
	int done = 0;
	spin_lock_irqsave(shost->host_lock, flags);
	if (time >= (init_timeout * HZ)) {
		dev_info(vhost->dev, "Scan taking longer than %d seconds, "
			 "continuing initialization\n", init_timeout);
		done = 1;
	}
	if (vhost->scan_complete)
		done = 1;
	spin_unlock_irqrestore(shost->host_lock, flags);
	return done;
}