From c96022ded7377228cc3381c661fd07efe10ba7fb Mon Sep 17 00:00:00 2001 From: Andrzej Pietrasiewicz Date: Tue, 28 May 2013 09:15:49 +0200 Subject: usb: gadget: f_eem: remove compatibility layer There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park Signed-off-by: Felipe Balbi --- drivers/usb/gadget/f_eem.c | 59 -------------------------------------------- drivers/usb/gadget/u_ether.h | 1 - 2 files changed, 60 deletions(-) diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index 471acc824115..9d54d68628e5 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c @@ -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 diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/u_ether.h index 5efa657cf469..fb23d1fde8eb 100644 --- a/drivers/usb/gadget/u_ether.h +++ b/drivers/usb/gadget/u_ether.h @@ -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 -- cgit v1.2.3