diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-12-23 21:10:18 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-04-03 14:43:31 +0300 |
commit | c4ed4ac198495895fd1620cba15184c3b2d399dc (patch) | |
tree | 4b6d1601559aed0d29f8348c7460828d1ec27d85 /drivers/usb/gadget/cdc2.c | |
parent | d6a0143985489e470a118605352f4b18df0ce142 (diff) | |
download | linux-3.10-c4ed4ac198495895fd1620cba15184c3b2d399dc.tar.gz linux-3.10-c4ed4ac198495895fd1620cba15184c3b2d399dc.tar.bz2 linux-3.10-c4ed4ac198495895fd1620cba15184c3b2d399dc.zip |
usb: gadget: push tty port allocation from gadget into f_acm
It possible to allocate the tty port number within the "instance"
structure of the function and there is no need to expose this
information within the gadget and therefore it is removed here.
This patch converts only f_acm and all its users. The other gadgets will
follow once the function is converted to the function interface.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/cdc2.c')
-rw-r--r-- | drivers/usb/gadget/cdc2.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index 61023aae986..c6ee6f1558c 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c @@ -108,13 +108,11 @@ static struct eth_dev *the_dev; static struct usb_function *f_acm; static struct usb_function_instance *fi_serial; -static unsigned char tty_line; /* * We _always_ have both CDC ECM and CDC ACM functions. */ static int __init cdc_do_config(struct usb_configuration *c) { - struct f_serial_opts *opts; int status; if (gadget_is_otg(c->cdev->gadget)) { @@ -130,9 +128,6 @@ static int __init cdc_do_config(struct usb_configuration *c) if (IS_ERR(fi_serial)) return PTR_ERR(fi_serial); - opts = container_of(fi_serial, struct f_serial_opts, func_inst); - opts->port_num = tty_line; - f_acm = usb_get_function(fi_serial); if (IS_ERR(f_acm)) goto err_func_acm; @@ -173,11 +168,6 @@ static int __init cdc_bind(struct usb_composite_dev *cdev) if (IS_ERR(the_dev)) return PTR_ERR(the_dev); - /* set up serial link layer */ - status = gserial_alloc_line(&tty_line); - if (status < 0) - goto fail0; - /* Allocate string descriptor numbers ... note that string * contents can be overridden by the composite_dev glue. */ @@ -200,8 +190,6 @@ static int __init cdc_bind(struct usb_composite_dev *cdev) return 0; fail1: - gserial_free_line(tty_line); -fail0: gether_cleanup(the_dev); return status; } @@ -210,7 +198,6 @@ static int __exit cdc_unbind(struct usb_composite_dev *cdev) { usb_put_function(f_acm); usb_put_function_instance(fi_serial); - gserial_free_line(tty_line); gether_cleanup(the_dev); return 0; } |