diff options
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_disc.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index 141c54b97082..880a9068ca12 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -712,13 +712,13 @@ static void fc_disc_stop_final(struct fc_lport *lport) | |||
712 | } | 712 | } |
713 | 713 | ||
714 | /** | 714 | /** |
715 | * fc_disc_init() - Initialize the discovery layer for a local port | 715 | * fc_disc_config() - Configure the discovery layer for a local port |
716 | * @lport: The local port that needs the discovery layer to be initialized | 716 | * @lport: The local port that needs the discovery layer to be configured |
717 | * @priv: Private data structre for users of the discovery layer | 717 | * @priv: Private data structre for users of the discovery layer |
718 | */ | 718 | */ |
719 | int fc_disc_init(struct fc_lport *lport, void *priv) | 719 | void fc_disc_config(struct fc_lport *lport, void *priv) |
720 | { | 720 | { |
721 | struct fc_disc *disc; | 721 | struct fc_disc *disc = &lport->disc; |
722 | 722 | ||
723 | if (!lport->tt.disc_start) | 723 | if (!lport->tt.disc_start) |
724 | lport->tt.disc_start = fc_disc_start; | 724 | lport->tt.disc_start = fc_disc_start; |
@@ -733,12 +733,21 @@ int fc_disc_init(struct fc_lport *lport, void *priv) | |||
733 | lport->tt.disc_recv_req = fc_disc_recv_req; | 733 | lport->tt.disc_recv_req = fc_disc_recv_req; |
734 | 734 | ||
735 | disc = &lport->disc; | 735 | disc = &lport->disc; |
736 | INIT_DELAYED_WORK(&disc->disc_work, fc_disc_timeout); | ||
737 | mutex_init(&disc->disc_mutex); | ||
738 | INIT_LIST_HEAD(&disc->rports); | ||
739 | 736 | ||
740 | disc->priv = priv; | 737 | disc->priv = priv; |
738 | } | ||
739 | EXPORT_SYMBOL(fc_disc_config); | ||
741 | 740 | ||
742 | return 0; | 741 | /** |
742 | * fc_disc_init() - Initialize the discovery layer for a local port | ||
743 | * @lport: The local port that needs the discovery layer to be initialized | ||
744 | */ | ||
745 | void fc_disc_init(struct fc_lport *lport) | ||
746 | { | ||
747 | struct fc_disc *disc = &lport->disc; | ||
748 | |||
749 | INIT_DELAYED_WORK(&disc->disc_work, fc_disc_timeout); | ||
750 | mutex_init(&disc->disc_mutex); | ||
751 | INIT_LIST_HEAD(&disc->rports); | ||
743 | } | 752 | } |
744 | EXPORT_SYMBOL(fc_disc_init); | 753 | EXPORT_SYMBOL(fc_disc_init); |