summaryrefslogtreecommitdiff
path: root/include/scsi/scsi_transport_fc.h
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2016-11-17 12:31:14 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-18 04:15:25 +0300
commitcd21c605b2cf1cf4e698eb4f043f6a7f72b55691 (patch)
treec7a48af651e960839c76384aa623c0eccf8a450d /include/scsi/scsi_transport_fc.h
parent1abaede71560fa98b97d8e6b172a14e6383f633d (diff)
downloadlinux-cd21c605b2cf1cf4e698eb4f043f6a7f72b55691.tar.xz
scsi: fc: provide fc_bsg_to_shost() helper
Provide fc_bsg_to_shost() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also use this little helper in the LLDDs. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi/scsi_transport_fc.h')
-rw-r--r--include/scsi/scsi_transport_fc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index eca8ed787b8a..efb948816f5d 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -819,6 +819,11 @@ fc_vport_set_state(struct fc_vport *vport, enum fc_vport_state new_state)
vport->vport_state = new_state;
}
+static inline struct Scsi_Host *fc_bsg_to_shost(struct fc_bsg_job *job)
+{
+ return job->shost;
+}
+
struct scsi_transport_template *fc_attach_transport(
struct fc_function_template *);
void fc_release_transport(struct scsi_transport_template *);