aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_rport.c
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2009-08-25 17:02:01 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-10 13:07:47 -0400
commit8345592b8388b51e0f52f63e94a5a5d3f07fda9a (patch)
treec1552168982507bc331a3163a62106c649179941 /drivers/scsi/libfc/fc_rport.c
parent19f97e3c0acc5eb03486044f5428395b7690a01a (diff)
[SCSI] libfc: change to make remote port callback optional
Since the rport list maintenance is now done in the rport module, the callback (and ops) are usually not necessary. Allow rdata->ops to be left NULL if nothing needs to be done in an event callback. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc/fc_rport.c')
-rw-r--r--drivers/scsi/libfc/fc_rport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 29bb6fd10036..406049c13a0e 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -250,7 +250,7 @@ static void fc_rport_work(struct work_struct *work)
250 rp->r_a_tov = rdata->r_a_tov; 250 rp->r_a_tov = rdata->r_a_tov;
251 mutex_unlock(&rdata->rp_mutex); 251 mutex_unlock(&rdata->rp_mutex);
252 252
253 if (rport_ops->event_callback) { 253 if (rport_ops && rport_ops->event_callback) {
254 FC_RPORT_DBG(rdata, "callback ev %d\n", event); 254 FC_RPORT_DBG(rdata, "callback ev %d\n", event);
255 rport_ops->event_callback(lport, rdata, event); 255 rport_ops->event_callback(lport, rdata, event);
256 } 256 }
@@ -269,7 +269,7 @@ static void fc_rport_work(struct work_struct *work)
269 mutex_unlock(&lport->disc.disc_mutex); 269 mutex_unlock(&lport->disc.disc_mutex);
270 } 270 }
271 271
272 if (rport_ops->event_callback) { 272 if (rport_ops && rport_ops->event_callback) {
273 FC_RPORT_DBG(rdata, "callback ev %d\n", event); 273 FC_RPORT_DBG(rdata, "callback ev %d\n", event);
274 rport_ops->event_callback(lport, rdata, event); 274 rport_ops->event_callback(lport, rdata, event);
275 } 275 }