aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_rport.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-10-18 10:01:44 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-08 17:29:55 -0500
commitc96c792aee33ab1a06c4d595959cd92eddbdbf3e (patch)
tree6a9369a3379db96e741264928635b346a565d847 /drivers/scsi/libfc/fc_rport.c
parentscsi: libfc: Replace ->rport_login callback with function call (diff)
downloadlinux-dev-c96c792aee33ab1a06c4d595959cd92eddbdbf3e.tar.xz
linux-dev-c96c792aee33ab1a06c4d595959cd92eddbdbf3e.zip
scsi: libfc: Replace ->rport_logoff callback with function call
The ->rport_logoff callback only ever had one implementation, so we can as well call it directly and drop the callback. Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Reviewed-by: Chad Dupuis <chad.dupuis@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_rport.c')
-rw-r--r--drivers/scsi/libfc/fc_rport.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index c045bc459910..22c8c928ee2b 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -295,7 +295,7 @@ static void fc_rport_work(struct work_struct *work)
}
if (!rport) {
FC_RPORT_DBG(rdata, "Failed to add the rport\n");
- lport->tt.rport_logoff(rdata);
+ fc_rport_logoff(rdata);
kref_put(&rdata->kref, fc_rport_destroy);
return;
}
@@ -504,7 +504,7 @@ static void fc_rport_enter_delete(struct fc_rport_priv *rdata,
* function will hold the rport lock, call an _enter_*
* function and then unlock the rport.
*/
-static int fc_rport_logoff(struct fc_rport_priv *rdata)
+int fc_rport_logoff(struct fc_rport_priv *rdata)
{
struct fc_lport *lport = rdata->local_port;
u32 port_id = rdata->ids.port_id;
@@ -538,6 +538,7 @@ out:
mutex_unlock(&rdata->rp_mutex);
return 0;
}
+EXPORT_SYMBOL(fc_rport_logoff);
/**
* fc_rport_enter_ready() - Transition to the RPORT_ST_READY state
@@ -2184,9 +2185,6 @@ static void fc_rport_flush_queue(void)
*/
int fc_rport_init(struct fc_lport *lport)
{
- if (!lport->tt.rport_logoff)
- lport->tt.rport_logoff = fc_rport_logoff;
-
if (!lport->tt.rport_recv_req)
lport->tt.rport_recv_req = fc_rport_recv_req;