There are no old function interface users left, so the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrze...@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>
---
 drivers/usb/gadget/f_subset.c |   59 +----------------------------------------
 drivers/usb/gadget/u_ether.h  |    4 ---
 2 files changed, 1 insertions(+), 62 deletions(-)

diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/f_subset.c
index f7b01c4..00ed508 100644
--- a/drivers/usb/gadget/f_subset.c
+++ b/drivers/usb/gadget/f_subset.c
@@ -299,13 +299,12 @@ geth_bind(struct usb_configuration *c, struct 
usb_function *f)
        int                     status;
        struct usb_ep           *ep;
 
-#ifndef USB_FSUBSET_INCLUDED
        struct f_gether_opts    *gether_opts;
 
        gether_opts = container_of(f->fi, struct f_gether_opts, func_inst);
        if (!gether_opts->ethaddr)
                return -EINVAL;
-#endif
+
        /* maybe allocate device-global string IDs */
        if (geth_string_defs[0].id == 0) {
                status = usb_string_ids_tab(c->cdev, geth_string_defs);
@@ -377,61 +376,6 @@ fail:
        return status;
 }
 
-#ifdef USB_FSUBSET_INCLUDED
-
-static void
-geth_old_unbind(struct usb_configuration *c, struct usb_function *f)
-{
-       geth_string_defs[0].id = 0;
-       usb_free_all_descriptors(f);
-       kfree(func_to_geth(f));
-}
-
-/**
- * geth_bind_config - add CDC Subset network link to a configuration
- * @c: the configuration to support the network link
- * @ethaddr: a buffer in which the ethernet address of the host side
- *     side of the link was recorded
- * Context: single threaded during gadget setup
- *
- * Returns zero on success, else negative errno.
- *
- * Caller must have called @gether_setup().  Caller is also responsible
- * for calling @gether_cleanup() before module unload.
- */
-int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
-               struct eth_dev *dev)
-{
-       struct f_gether *geth;
-       int             status;
-
-       /* allocate and initialize one new instance */
-       geth = kzalloc(sizeof *geth, GFP_KERNEL);
-       if (!geth)
-               return -ENOMEM;
-
-       /* export host's Ethernet address in CDC format */
-       snprintf(geth->ethaddr, sizeof geth->ethaddr, "%pm", ethaddr);
-       geth_string_defs[1].s = geth->ethaddr;
-
-       geth->port.ioport = dev;
-       geth->port.cdc_filter = DEFAULT_FILTER;
-
-       geth->port.func.name = "cdc_subset";
-       geth->port.func.strings = geth_strings;
-       geth->port.func.bind = geth_bind;
-       geth->port.func.unbind = geth_old_unbind;
-       geth->port.func.set_alt = geth_set_alt;
-       geth->port.func.disable = geth_disable;
-
-       status = usb_add_function(c, &geth->port.func);
-       if (status)
-               kfree(geth);
-       return status;
-}
-
-#else
-
 static void geth_free_inst(struct usb_function_instance *f)
 {
        struct f_gether_opts *opts;
@@ -501,4 +445,3 @@ DECLARE_USB_FUNCTION_INIT(geth, geth_alloc_inst, 
geth_alloc);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Brownell");
 
-#endif
diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/u_ether.h
index 93c6def..da1aff8 100644
--- a/drivers/usb/gadget/u_ether.h
+++ b/drivers/usb/gadget/u_ether.h
@@ -112,10 +112,6 @@ static inline bool can_support_ecm(struct usb_gadget 
*gadget)
        return true;
 }
 
-/* each configuration may bind one instance of an ethernet link */
-int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
-               struct eth_dev *dev);
-
 #ifdef USB_ETH_RNDIS
 
 int rndis_bind_config_vendor(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to