aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r--include/scsi/libfc.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 690f8296e63..ed3057b4e78 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -739,12 +739,21 @@ static inline void *lport_priv(const struct fc_lport *lp)
739 * @sht: ptr to the scsi host templ 739 * @sht: ptr to the scsi host templ
740 * @priv_size: size of private data after fc_lport 740 * @priv_size: size of private data after fc_lport
741 * 741 *
742 * Returns: ptr to Scsi_Host 742 * Returns: libfc lport
743 */ 743 */
744static inline struct Scsi_Host * 744static inline struct fc_lport *
745libfc_host_alloc(struct scsi_host_template *sht, int priv_size) 745libfc_host_alloc(struct scsi_host_template *sht, int priv_size)
746{ 746{
747 return scsi_host_alloc(sht, sizeof(struct fc_lport) + priv_size); 747 struct fc_lport *lport;
748 struct Scsi_Host *shost;
749
750 shost = scsi_host_alloc(sht, sizeof(*lport) + priv_size);
751 if (!shost)
752 return NULL;
753 lport = shost_priv(shost);
754 lport->host = shost;
755 INIT_LIST_HEAD(&lport->ema_list);
756 return lport;
748} 757}
749 758
750/* 759/*