diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2015-12-11 16:06:24 +0100 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-12-20 19:40:41 -0800 |
commit | c3f890bc79f12d12c2ccabe4bfc0c4a1e01b3184 (patch) | |
tree | 1fc328161c1ef31f99b0ea382537bb3450d10d82 /drivers/usb/gadget/function/f_tcm.c | |
parent | e5587ea11e243abd2527e4a048e72ee7a885d1f1 (diff) | |
download | linux-c3f890bc79f12d12c2ccabe4bfc0c4a1e01b3184.tar.gz linux-c3f890bc79f12d12c2ccabe4bfc0c4a1e01b3184.tar.bz2 linux-c3f890bc79f12d12c2ccabe4bfc0c4a1e01b3184.zip |
usb: gadget: f_tcm: remove redundant singleton
The only instance is guaranteed with TPG_INSTANCES defined to 1.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/usb/gadget/function/f_tcm.c')
-rw-r--r-- | drivers/usb/gadget/function/f_tcm.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c index 33afe6ac0b62..b33738a8eea2 100644 --- a/drivers/usb/gadget/function/f_tcm.c +++ b/drivers/usb/gadget/function/f_tcm.c @@ -1371,8 +1371,6 @@ static int usbg_init_nodeacl(struct se_node_acl *se_nacl, const char *name) return 0; } -struct usbg_tpg *the_only_tpg_I_currently_have; - static struct se_portal_group *usbg_make_tpg( struct se_wwn *wwn, struct config_group *group, @@ -1390,11 +1388,6 @@ static struct se_portal_group *usbg_make_tpg( return ERR_PTR(-EINVAL); if (kstrtoul(name + 5, 0, &tpgt) || tpgt > UINT_MAX) return ERR_PTR(-EINVAL); - if (the_only_tpg_I_currently_have) { - pr_err("Until the gadget framework can't handle multiple\n"); - pr_err("gadgets, you can't do this here.\n"); - return ERR_PTR(-EBUSY); - } ret = -ENODEV; mutex_lock(&tpg_instances_lock); for (i = 0; i < TPG_INSTANCES; ++i) @@ -1437,7 +1430,6 @@ static struct se_portal_group *usbg_make_tpg( tpg->fi = tpg_instances[i].func_inst; mutex_unlock(&opts->dep_lock); mutex_unlock(&tpg_instances_lock); - the_only_tpg_I_currently_have = tpg; return &tpg->se_tpg; free_workqueue: @@ -1481,7 +1473,6 @@ static void usbg_drop_tpg(struct se_portal_group *se_tpg) mutex_unlock(&tpg_instances_lock); kfree(tpg); - the_only_tpg_I_currently_have = NULL; } static struct se_wwn *usbg_make_tport( |