diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2009-08-25 14:02:01 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-10 12:07:47 -0500 |
commit | 8345592b8388b51e0f52f63e94a5a5d3f07fda9a (patch) | |
tree | c1552168982507bc331a3163a62106c649179941 /drivers/scsi/libfc/fc_rport.c | |
parent | 19f97e3c0acc5eb03486044f5428395b7690a01a (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 29bb6fd1003..406049c13a0 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) rp->r_a_tov = rdata->r_a_tov; mutex_unlock(&rdata->rp_mutex); - if (rport_ops->event_callback) { + if (rport_ops && rport_ops->event_callback) { FC_RPORT_DBG(rdata, "callback ev %d\n", event); rport_ops->event_callback(lport, rdata, event); } @@ -269,7 +269,7 @@ static void fc_rport_work(struct work_struct *work) mutex_unlock(&lport->disc.disc_mutex); } - if (rport_ops->event_callback) { + if (rport_ops && rport_ops->event_callback) { FC_RPORT_DBG(rdata, "callback ev %d\n", event); rport_ops->event_callback(lport, rdata, event); } |