summaryrefslogtreecommitdiffstats
path: root/drivers/target/tcm_fc/tfc_conf.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-05-01 17:47:55 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-05-30 22:42:27 -0700
commit3868e4365f1735698df373733c9d99d7b9a688e8 (patch)
treea6be6aaf934601b8a16c159e168e4971f4116007 /drivers/target/tcm_fc/tfc_conf.c
parent1667a459c382d4a90d05b0e8feab2d0b4ff27667 (diff)
downloadlinux-stable-3868e4365f1735698df373733c9d99d7b9a688e8.tar.gz
linux-stable-3868e4365f1735698df373733c9d99d7b9a688e8.tar.bz2
linux-stable-3868e4365f1735698df373733c9d99d7b9a688e8.zip
tcm_fc: stop using se_tpg_fabric_ptr
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc/tfc_conf.c')
-rw-r--r--drivers/target/tcm_fc/tfc_conf.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
index 8da159352315..4bdf7a25ae67 100644
--- a/drivers/target/tcm_fc/tfc_conf.c
+++ b/drivers/target/tcm_fc/tfc_conf.c
@@ -409,6 +409,11 @@ static struct configfs_attribute *ft_wwn_attrs[] = {
NULL,
};
+static inline struct ft_tpg *ft_tpg(struct se_portal_group *se_tpg)
+{
+ return container_of(se_tpg, struct ft_tpg, se_tpg);
+}
+
static char *ft_get_fabric_name(void)
{
return "fc";
@@ -416,20 +421,16 @@ static char *ft_get_fabric_name(void)
static char *ft_get_fabric_wwn(struct se_portal_group *se_tpg)
{
- struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr;
-
- return tpg->lport_wwn->name;
+ return ft_tpg(se_tpg)->lport_wwn->name;
}
static u16 ft_get_tag(struct se_portal_group *se_tpg)
{
- struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr;
-
/*
* This tag is used when forming SCSI Name identifier in EVPD=1 0x83
* to represent the SCSI Target Port.
*/
- return tpg->index;
+ return ft_tpg(se_tpg)->index;
}
static int ft_check_false(struct se_portal_group *se_tpg)
@@ -443,9 +444,7 @@ static void ft_set_default_node_attr(struct se_node_acl *se_nacl)
static u32 ft_tpg_get_inst_index(struct se_portal_group *se_tpg)
{
- struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr;
-
- return tpg->index;
+ return ft_tpg(se_tpg)->index;
}
static const struct target_core_fabric_ops ft_fabric_ops = {