|
@@ -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
|