usb: gadget: f_eem: remove compatibility layer
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Tue, 28 May 2013 07:15:49 +0000 (09:15 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 10 Jun 2013 14:57:47 +0000 (17:57 +0300)
There are no old function interface users left, so the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/f_eem.c
drivers/usb/gadget/u_ether.h

index 471acc8..9d54d68 100644 (file)
@@ -251,7 +251,6 @@ static int eem_bind(struct usb_configuration *c, struct usb_function *f)
        int                     status;
        struct usb_ep           *ep;
 
-#ifndef USB_FEEM_INCLUDED
        struct f_eem_opts       *eem_opts;
 
        eem_opts = container_of(f->fi, struct f_eem_opts, func_inst);
@@ -269,7 +268,6 @@ static int eem_bind(struct usb_configuration *c, struct usb_function *f)
                        return status;
                eem_opts->bound = true;
        }
-#endif
 
        /* maybe allocate device-global string IDs */
        if (eem_string_defs[0].id == 0) {
@@ -539,61 +537,6 @@ error:
        return status;
 }
 
-#ifdef USB_FEEM_INCLUDED
-
-static void eem_old_unbind(struct usb_configuration *c, struct usb_function *f)
-{
-       struct f_eem    *eem = func_to_eem(f);
-
-       DBG(c->cdev, "eem unbind\n");
-
-       usb_free_all_descriptors(f);
-       kfree(eem);
-}
-
-/**
- * eem_bind_config - add CDC Ethernet (EEM) network link to a configuration
- * @c: the configuration to support the network link
- * 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 __init eem_bind_config(struct usb_configuration *c, struct eth_dev *dev)
-{
-       struct f_eem    *eem;
-       int             status;
-
-       /* allocate and initialize one new instance */
-       eem = kzalloc(sizeof *eem, GFP_KERNEL);
-       if (!eem)
-               return -ENOMEM;
-
-       eem->port.ioport = dev;
-       eem->port.cdc_filter = DEFAULT_FILTER;
-
-       eem->port.func.name = "cdc_eem";
-       eem->port.func.strings = eem_strings;
-       /* descriptors are per-instance copies */
-       eem->port.func.bind = eem_bind;
-       eem->port.func.unbind = eem_old_unbind;
-       eem->port.func.set_alt = eem_set_alt;
-       eem->port.func.setup = eem_setup;
-       eem->port.func.disable = eem_disable;
-       eem->port.wrap = eem_wrap;
-       eem->port.unwrap = eem_unwrap;
-       eem->port.header_len = EEM_HLEN;
-
-       status = usb_add_function(c, &eem->port.func);
-       if (status)
-               kfree(eem);
-       return status;
-}
-
-#else
-
 static void eem_free_inst(struct usb_function_instance *f)
 {
        struct f_eem_opts *opts;
@@ -670,5 +613,3 @@ struct usb_function *eem_alloc(struct usb_function_instance *fi)
 DECLARE_USB_FUNCTION_INIT(eem, eem_alloc_inst, eem_alloc);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Brownell");
-
-#endif
index 5efa657..fb23d1f 100644 (file)
@@ -272,7 +272,6 @@ int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
                struct eth_dev *dev);
 int ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
                struct eth_dev *dev);
-int eem_bind_config(struct usb_configuration *c, struct eth_dev *dev);
 
 #ifdef USB_ETH_RNDIS