aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libfc.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 4e1d394348cf..0303a6a098cc 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -696,11 +696,6 @@ struct fc_lport {
696/* 696/*
697 * FC_LPORT HELPER FUNCTIONS 697 * FC_LPORT HELPER FUNCTIONS
698 *****************************/ 698 *****************************/
699static inline void *lport_priv(const struct fc_lport *lp)
700{
701 return (void *)(lp + 1);
702}
703
704static inline int fc_lport_test_ready(struct fc_lport *lp) 699static inline int fc_lport_test_ready(struct fc_lport *lp)
705{ 700{
706 return lp->state == LPORT_ST_READY; 701 return lp->state == LPORT_ST_READY;
@@ -743,6 +738,23 @@ static inline struct fcoe_dev_stats *fc_lport_get_stats(struct fc_lport *lp)
743 return per_cpu_ptr(lp->dev_stats, smp_processor_id()); 738 return per_cpu_ptr(lp->dev_stats, smp_processor_id());
744} 739}
745 740
741static inline void *lport_priv(const struct fc_lport *lp)
742{
743 return (void *)(lp + 1);
744}
745
746/**
747 * libfc_host_alloc() - Allocate a Scsi_Host with room for the fc_lport
748 * @sht: ptr to the scsi host templ
749 * @priv_size: size of private data after fc_lport
750 *
751 * Returns: ptr to Scsi_Host
752 */
753static inline struct Scsi_Host *
754libfc_host_alloc(struct scsi_host_template *sht, int priv_size)
755{
756 return scsi_host_alloc(sht, sizeof(struct fc_lport) + priv_size);
757}
746 758
747/* 759/*
748 * LOCAL PORT LAYER 760 * LOCAL PORT LAYER