diff options
author | Christoph Hellwig <hch@lst.de> | 2015-04-13 19:51:10 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-05-30 22:41:49 -0700 |
commit | a3b679e7e4369dfb5be735598888fcdef9d35196 (patch) | |
tree | 4ffd2d9a0171147702fb63db8d7494ac3bda9899 | |
parent | df75b956274b03e09426c1169f913d884d768ee7 (diff) | |
download | linux-a3b679e7e4369dfb5be735598888fcdef9d35196.tar.gz linux-a3b679e7e4369dfb5be735598888fcdef9d35196.tar.bz2 linux-a3b679e7e4369dfb5be735598888fcdef9d35196.zip |
tcm_usb: remove struct usbg_nacl
Except for the embedded struct se_node_acl none of the fields were
ever used.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/usb/gadget/legacy/tcm_usb_gadget.c | 24 | ||||
-rw-r--r-- | drivers/usb/gadget/legacy/tcm_usb_gadget.h | 9 |
2 files changed, 3 insertions, 30 deletions
diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadget.c b/drivers/usb/gadget/legacy/tcm_usb_gadget.c index 8b80addc4ce6..aba80e245e44 100644 --- a/drivers/usb/gadget/legacy/tcm_usb_gadget.c +++ b/drivers/usb/gadget/legacy/tcm_usb_gadget.c @@ -1380,22 +1380,14 @@ static char *usbg_parse_pr_out_transport_id( static struct se_node_acl *usbg_alloc_fabric_acl(struct se_portal_group *se_tpg) { - struct usbg_nacl *nacl; - - nacl = kzalloc(sizeof(struct usbg_nacl), GFP_KERNEL); - if (!nacl) - return NULL; - - return &nacl->se_node_acl; + return kzalloc(sizeof(struct se_node_acl), GFP_KERNEL); } static void usbg_release_fabric_acl( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl) { - struct usbg_nacl *nacl = container_of(se_nacl, - struct usbg_nacl, se_node_acl); - kfree(nacl); + kfree(se_nacl); } static u32 usbg_tpg_get_inst_index(struct se_portal_group *se_tpg) @@ -1495,8 +1487,6 @@ static struct se_node_acl *usbg_make_nodeacl( const char *name) { struct se_node_acl *se_nacl, *se_nacl_new; - struct usbg_nacl *nacl; - u64 wwpn = 0; u32 nexus_depth; const char *wnn_name; @@ -1518,21 +1508,13 @@ static struct se_node_acl *usbg_make_nodeacl( usbg_release_fabric_acl(se_tpg, se_nacl_new); return se_nacl; } - /* - * Locate our struct usbg_nacl and set the FC Nport WWPN - */ - nacl = container_of(se_nacl, struct usbg_nacl, se_node_acl); - nacl->iport_wwpn = wwpn; - snprintf(nacl->iport_name, sizeof(nacl->iport_name), "%s", name); return se_nacl; } static void usbg_drop_nodeacl(struct se_node_acl *se_acl) { - struct usbg_nacl *nacl = container_of(se_acl, - struct usbg_nacl, se_node_acl); core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1); - kfree(nacl); + kfree(se_acl); } struct usbg_tpg *the_only_tpg_I_currently_have; diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadget.h b/drivers/usb/gadget/legacy/tcm_usb_gadget.h index 8289219925b8..b254aec521da 100644 --- a/drivers/usb/gadget/legacy/tcm_usb_gadget.h +++ b/drivers/usb/gadget/legacy/tcm_usb_gadget.h @@ -25,15 +25,6 @@ enum { #define USB_G_ALT_INT_BBB 0 #define USB_G_ALT_INT_UAS 1 -struct usbg_nacl { - /* Binary World Wide unique Port Name for SAS Initiator port */ - u64 iport_wwpn; - /* ASCII formatted WWPN for Sas Initiator port */ - char iport_name[USBG_NAMELEN]; - /* Returned by usbg_make_nodeacl() */ - struct se_node_acl se_node_acl; -}; - struct tcm_usbg_nexus { struct se_session *tvn_se_sess; }; |