diff options
author | Hannes Reinecke <hare@suse.de> | 2016-10-18 11:01:42 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-09 01:29:55 +0300 |
commit | 2580064b5ec6dc9efa475298b276ab21f5cc287d (patch) | |
tree | 70331d1a31c5160aef6eb4d529e344a579166496 /drivers/scsi/libfc/fc_rport.c | |
parent | 558b88fe6dd88a16563a4d72b674947b8130a550 (diff) | |
download | linux-2580064b5ec6dc9efa475298b276ab21f5cc287d.tar.xz |
scsi: libfc: Replace ->rport_create callback with function call
The ->rport_create callback only ever had a single 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>
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.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 5f674fc8412f..b05fa9997db5 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -137,8 +137,7 @@ EXPORT_SYMBOL(fc_rport_lookup); * * Locking note: must be called with the disc_mutex held. */ -static struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, - u32 port_id) +struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, u32 port_id) { struct fc_rport_priv *rdata; @@ -172,6 +171,7 @@ static struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, } return rdata; } +EXPORT_SYMBOL(fc_rport_create); /** * fc_rport_destroy() - Free a remote port after last reference is released @@ -1847,7 +1847,7 @@ static void fc_rport_recv_plogi_req(struct fc_lport *lport, disc = &lport->disc; mutex_lock(&disc->disc_mutex); - rdata = lport->tt.rport_create(lport, sid); + rdata = fc_rport_create(lport, sid); if (!rdata) { mutex_unlock(&disc->disc_mutex); rjt_data.reason = ELS_RJT_UNAB; @@ -2175,9 +2175,6 @@ static void fc_rport_flush_queue(void) */ int fc_rport_init(struct fc_lport *lport) { - if (!lport->tt.rport_create) - lport->tt.rport_create = fc_rport_create; - if (!lport->tt.rport_login) lport->tt.rport_login = fc_rport_login; |