scsi: fc: provide fc_bsg_to_rport() helper

Provide fc_bsg_to_rport() helper that will become handy when we're
moving from struct fc_bsg_job to a plain struct bsg_job. Also move all
LLDDs to use the new helper.

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>
This commit is contained in:
Johannes Thumshirn
2016-11-17 10:31:15 +01:00
committed by Martin K. Petersen
parent cd21c605b2
commit 1d69b1222a
7 changed files with 19 additions and 11 deletions

View File

@@ -2103,7 +2103,7 @@ int fc_lport_bsg_request(struct fc_bsg_job *job)
switch (bsg_request->msgcode) {
case FC_BSG_RPT_ELS:
rport = job->rport;
rport = fc_bsg_to_rport(job);
if (!rport)
break;
@@ -2113,7 +2113,7 @@ int fc_lport_bsg_request(struct fc_bsg_job *job)
break;
case FC_BSG_RPT_CT:
rport = job->rport;
rport = fc_bsg_to_rport(job);
if (!rport)
break;